How to specify the size of field ?

8 years 3 months ago #253260 by ejl

I am developping a CB plugin. In this plugin, I declare new field.
But I would like to specify the size of field.

The solution I have found is :
1) to add attribute "size" in declaration of the field in xml file
2) modifiy code (file : cbInstallerPlugin) as follow :

Exemple : myPlugin.xml
<field name="cb_telephonefixe" title="Téléphone fixe" translated-title="Téléphone fixe" description="Téléphone fixe" type="text" registration="0" profile="1" readonly="0" [color=#ff0000]size="40"[/color] params="" />

File : cbInstallerPlugin.php
		function installField( $pluginId, $tabId, $field )
ligne : 536 	$row->size			=	$field->attributes('size');
		$row->maxlength		=	$field->attributes('maxlength');

It is a good solution ? It is possible to add theses modifications in a next version ?



Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.142 seconds

Facebook Twitter LinkedIn