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 <[email protected]> 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 [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
-~----------~----~----~----~------~----~------~--~---

Reply via email to