I have an admin_index page for a model that requires a listing for each row, which includes a *separate* form with a couple of checkboxes. The controller action is:
public function admin_index() { $this->data = $this->paginate(); } Now, in the view, I cannot figure out how to get the FormHelper to properly set the "checked" attribute on these checkboxes. Why doesn't this work? (I'm not interested in editing multiple records with a single form, btw.) foreach($this->data as $k => $foo) { ?> <?= $form->create('Foo', array('action' => 'edit')) ?> <?= $form->hidden("Foo.${k}.id") ?> <table> <tr> <td> <?= $foo['User']['label'] ?> (<?= $foo['User']['id'] ?>) </td> <td> <?= $form->input("Foo.${k}.something") ?> </td> <td> <?= $form->input("Foo.${k}.something_else") ?> </td> <td> <?= $form->submit('edit') ?> </td> </tr> </table> <?= $form->end() ?> I thought FormHelper was able to do this if $this->data is set. I know that I can just type out the form markup, but ... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---