Params.list.jpg

The list form field type provides a drop down list or a list box of custom-defined entries. If the field has a saved value this is selected when the page is first loaded. If not, the default value (if any) is selected.

The XML <field> element must include one or more <option> elements which define the list items. The text between the <option> and </option> tags is what will be shown in the drop down list and is a translatable string. The <option> tag takes the following argument:

Tip: Don't forget to close the field definition with </field>.

Example XML field definition:

<field name="mylistvalue" type="list" default="" label="Select an option" description="">
  <option value="0">Option 1</option>
  <option value="1">Option 2</option>
</field>

[edit] See also

License: Joomla! Electronic Documentation License
Source page: http://docs.joomla.org/List_form_field_type
Page retrieved: 1.703 seconds, 2.18 MB

Top