![]() |
Languages: |
English |
In Joomla! 1.5, form fields were parameters. For that version, you may want to use the corresponding Radio parameter type. |
The radio form field type provides radio buttons to select different options. 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 individual radio button items. The text between the <option>
and </option>
tags is shown as the label for the radio button 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="myradiovalue" type="radio" default="0" label="Select an option" description=""> <option value="0">1</option> <option value="1">2</option> </field>