Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 25th)
🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

How to specify the size of field ?

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