Tag - radio
Description
Helper tag for a radio button
Parameters
- value (required) - The value of the radio button
- name (required) - The name of the radio button
- checked (optional) - boolean to indicate that the radio button should be checked
Note that the value assigned to the "checked" attribute is irrelevant. The existence of the "checked" attribute results in the checked="checked" being output to the HTML. This is in accordance with the W3C documentation. So don't think that checked="false" will do you any good.
Examples
<g:radio name="myGroup" value="1"/>
<g:radio name="myGroup" value="2" checked="true"/>
results in:
<input type="radio" name="myGroup" value="1" />
<input type="radio" name="myGroup" checked="checked" value="2" />