Skip to Content Skip to Menu

🌟 CB Editor Assistant 1.0.0 is here! Discover our new AI Joomla Plugin that wrote its story! (and this banner!)
Start at just $12.50/month* or 💸 save 30% with our 🛍️ Black Friday Intro Offer for your subscription's lifetime
🎉 Black Friday sale is here! Great savings on professional and developer memberships! Get 25% off now with code BLACK-FRIDAY-2024!

How to specify the size of field ?

  • ejl
  • ejl
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
10 years 4 days 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