f:form.radio

This ViewHelper allows you to create a radio button element for use in an HTML form. Radio button fields are usually used in groups, and only a single radio button in a group may be active at one time. A multiple selection - like the one we see when using checkboxes - isn't possible with radio buttons.

Properties

All the universal tag attributes

All the universal form field attributes

Exclusive properties for the HTML-Element

checked

Variable type
Boolean
Description
When active, the radio button field will appear in a checked (active) state.
Default value
NULL
Mandatory
No

Examples

<f:form.radio name="myExtName[age]" value="1-10" />
<f:form.radio name="myExtName[age]" value="11-40" />
<f:form.radio name="myExtName[age]" value="41-99" />

Preselect

<f:form.radio name="myRadioButton" value="someValue" checked="{object.value} == 5" />

Bind to object property

<f:form.radio property="age" value="1-10" />
<f:form.radio property="age" value="11-40" />
<f:form.radio property="age" value="41-99" />