-3

I am doing customization of joomla component i want to add multiple check boxes from database how to achive this?

  • It's hard to answer your questioin without knowing what extension you're customizing, Joomla version and what kind of skills do you have. – di3sel Mar 21 '14 at 09:35

2 Answers2

0

You probably need to make your own field type, possible using the joomla sql field type as a template ( http://docs.joomla.org/SQL_form_field_type ).

The sql field type is found in libraries/joomla/form/fields/sql.php. Copy this file to the models/fields - folder of your component, and rename it to ex. chk.php. The class name should then be renamed to JFormFieldChk, and the $type-variable should be 'chk'.

In models/forms/ your form-xml-file can now load the new field, using similar syntax as the sql-field, ex.: <field name="myfield" type="sql" default="10" label="Select an article" query="SELECT id, title FROM #__content" key_field="id" value_field="title" required="true"> <option value="">Please select your option</option> </field>

Further modify the file to use checkboxes instead of the standard select field.

jonasfh
  • 4,151
  • 2
  • 21
  • 37
0

You must create your own field or you can use this I created. https://github.com/3ehrang/joomlaFields

3ehrang
  • 619
  • 1
  • 7
  • 22