CMS Joomla Mastering Development

custom form list field add disabled options

i have a working list based on an sql query – now i would like to add some spacers (not selectable items) – when doing this manually in xml you can add the disabled attr to that item but how can i do that when filling the list like so:

$cities = array(
                array('value' => 1, 'text' => 'New York'),
                array('value' => 2, 'text' => 'Chicago'),
                array('value' => 3, 'text' => 'San Francisco'),

i have tried to add ‘disabled’=> ‘true’ to the item array and some different versions of ‘attribute’ => ‘disabled’

…none of them worked so far.

Leave a Reply

Your email address will not be published. Required fields are marked *