Hola a todos! Tengo una vista index.ctp con el código: <?php foreach ($clientes as $cliente): echo $cliente['Cliente']['id']; echo $html->link('Editar',array('action'=>'editar','id'=>$cliente ['Cliente']['id'])); echo $form->checkbox('Clientes.id.['.$cliente ['Cliente']['id'].']', array('value' => $cliente['Cliente']['id'])); endforeach; echo $html->link('Borrar',array ('action'=>'borrarseleccionados')) ?>
De esta forma los checkboxes seran Messages.id.[1], Messages.id.[2], Messages.id.[3]… Y el clientes_controller: function borrarseleccionados() { foreach($this->data['Clientes'] as $key => $value) { if($value != 0) { $this->Cliente->del($value); } } } De esta forma recibo el error:Invalid argument supplied for foreach() Y si ponto function borrarseleccionados($value) recibo el error: Missing argument 1 for ClientesController::borrarseleccionados() No se como pasarle los valores a la funcion....o lo que estoy haciendo mal. Agradecería muchisimo algo de ayuda.... Saludos! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---