Skip to Content Skip to Menu

🏖 End of summer sale! Savings on all memberships including single add-ons! Get 25% off now with code SUMMER25!

How to specify the size of field ?

  • ejl
  • ejl
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
9 years 9 months ago #253260 by ejl
Hello,

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
Code:
<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
Code:
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 ?

Thanks,

EJ

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum