Not possible to have "name" attribute to be an array name in $form->radio()
Permalink
Looks like it's not possible to have name attribute to have an array name. If you do this:
it will give you this:
If you do this:
it will give you this:
This prints out a correct "name" attribute but gives a wrong markup for "id". Looks like I have to use the direct html code instead of $form->radio() method.
it will give you this:
<input type="radio" checked="checked" class="ccm-input-radio" value="red" id="color1" name="color"> Red <input type="radio" class="ccm-input-radio" value="blue" id="color2" name="color"> Blue
If you do this:
it will give you this:
<input type="radio" checked="checked" class="ccm-input-radio" value="red" id="color[]1" name="color[]"> Red <input type="radio" class="ccm-input-radio" value="blue" id="color[]2" name="color[]"> Blue
This prints out a correct "name" attribute but gives a wrong markup for "id". Looks like I have to use the direct html code instead of $form->radio() method.