Hello,
You can do something like
[code]
$this->setDefaults(array('category' => array(2,3,4,5)));
[/code]
Good luck !
Quentin.
On Oct 29, 4:31 am, Cindy Cullen <[email protected]> wrote:
> I have an sfWidgetFormSelect set to 'multiple' like this in my form:
>
> $sel = DbFinder::from('category')->find();
>
> $this->widgetSchema['category'] = new
> sfWidgetFormSelect(array('choices'=>$sel, 'multiple'=>'true'));
>
> I need to set multiple defaults - how can I do that?
>
> I can set one like this:
>
> $this->setDefaults(array('category' =>2));
>
> but how do I set multiples as defaults?
>
> Actually, I'm trying to read the categories from the database and set
> those that have been selected previously.
>
> Can anyone help?
>
> Thanks!
>
> Cindy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" 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/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---