I'm not sure to be honest because i once had this problem and i ended up in writing plain html, but maybe it had something to do with a tricky s thing (it could also be, that i didnt liked it how cake arranges checkboxes and normal inputs differently). but i do remember that i got it to work at some point, using cakes helper
basically it should be possible if you always use the same name for the input and provide an $options-array with only one element each time you call it... be sure to add an 'id' attribute because otherwise you would get wrong html because of repeated ids (because cake generates the id from the input-name and due to having only one options-element per call all checkboxes would have an id like 'FormField0') in every case where the form helper is not enough, you could extend it and implement your own helper-methods using the basic-form-helper methods.. For example you could implement a create_checkboxes($default, $input, $args) method which would store all the needed checkboxes in an internal array and then another method get_checkbox($value) which would output the checkbox which represents $value..but this is just a quick'n'dirty idea about how to extend the formhelper On 9 Aug., 18:44, xndx <[email protected]> wrote: > Hey guys, > > Not sure if this is possible so apologies for a silly question, but I > currently have this code that does a nice checkbox list of options: > > echo $form->input('whatever', array('multiple' => 'checkbox', 'label' > => false, 'options' => array($whatever))); > > This works great, but I need to place each item into it's own table > row along some other data and apply some Javascript to it. Is there > anyway to nicely do this using the form helper or am I going to have > to use some messy code and hack around it? > > Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
