Thursday, September 3, 2009

Re: 'Multiple' type form input - assigning initial values

Ha, scratch that - tried again and it worked! Must be my useless
sausage fingers.

On Sep 3, 4:18 pm, toby1kenobi <toby.math...@gmail.com> wrote:
> Hi there,
>
>   I feel like I'm missing something obvious...
>
>   I'm using
>
> $form->input('field_name', array('type' => 'select', 'multiple' =>
> true));
>
>   to output HTML selects with 'multiple' attributes, and that's all
> great. I can't figure out how to specify which options are selected
> though? The most obvious solution (to me anyway) seemed to be to add
>
> 'value' => array(1, 2, 3)
>
> or something like that, but it has no effect. What am I missing?
>
>   Thanks,
>
> Toby
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: