radioGroup

Purpose

Helper tag for creating radio button groups

Examples

<g:radioGroup name="myGroup" values="[1,2,3]" value="1" >
<p><g:message code="${it.label}" />: ${it.radio}</p>
</g:radioGroup>

results in:

<p>Radio 1: <input type="radio" name="myGroup" value="1" checked="checked" /></p>
<p>Radio 2: <input type="radio" name="myGroup" value="2" /></p>
<p>Radio 3: <input type="radio" name="myGroup" value="3" /></p>

<g:radioGroup name="lovesGrails" labels="['Yes!','Of course!','Always!]" values="[1,2,3]" >
<p>${it.label}" ${it.radio}</p>
</g:radioGroup>

results in:

<p>Yes! <input type="radio" name="lovesGrails" value="1" /></p>
<p>Of course! <input type="radio" name="lovesGrails" value="2" /></p>
<p>Always! <input type="radio" name="lovesGrails" value="3" /></p>

Description

The body of the tag contains the GSP to render for each value. The two following variables are provided for use:

Attributes

Source