If you don't want to add them by hand ever time. I've written a function that will do it for you:
http://www.richardathome.com/blog/cakephp-auto-populating-foreign-key-dropdown-fields On May 8, 3:16 pm, brian <bally.z...@gmail.com> wrote: > Did you fetch a list of Users in your controller? FormHelper can only > work with what's already set in your $viewVars. > > On Fri, May 8, 2009 at 5:34 AM, GetIT <david.bruen...@t-online.de> wrote: > > > I want checkboxes displaying all users in my database. > > > For example: > > In my app some users can add new documents and they can choose which > > users have the right to see the docs. > > > So in my fileupload form I want to add checkboxes showing all users. > > But this doesn´t work. > > In the documentation of CakePHP I see that: > > # $form->input('Model.field', array( 'type' => 'select', 'multiple' => > > 'checkbox' )); > > > So I put this code in my app: > > echo $form->input('User.name', array( > > 'label' => 'Users', > > 'type' => 'select', > > 'multiple' => 'checkbox' > > )) . "\n"; > > But the output only is the value of the label: Users > > > What´s the failure? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---