If you want multi-select, shouldn't you be using checkboxes? Radios are normally for selecting a single value from multiple choices into a single field, which is why Cake is drawing them with the same field name.
Jeremy Burns Class Outfit [email protected] http://www.classoutfit.com On 12 Apr 2011, at 10:22, Johannes Hansen wrote: > Hey, > > I am having a problem with my radio inputs and the corresponding > labels. > My code looks like this: > <? > echo $form->radio('Model.0.fieldName', array('1' => 'Value1', '2' => > 'Value2', '3' => 'Value3')); > ?> > > What I get as a result is > <input type="radio" value="1" id="Model0FieldName"><label > for="Model0FieldName">Value1</label> > <input type="radio" value="2" id="Model0FieldName"><label > for="Model0FieldName">Value2</label> > <input type="radio" value="3" id="Model0FieldName"><label > for="Model0FieldName">Value3</label> > > What I am expecting to get is rather "Model0FieldName1" as "id" and > "for" attribute (with the value added) so I could click on each label > to select the radio button. > > Does anyone have an idea what I am doing wrong? Since the code is > quite simple I don't know where else to look for the error. > > Thanks! > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP Questions site http://ask.cakephp.org and help > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > [email protected] For more options, visit this group at > http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
