Have you tried this? $this->setDefaults(array( 'authors_list' => array(2) ));
On 26 nov, 16:31, dziobacz <aaabbbcccda...@gmail.com> wrote: > I have tables: Books, BooksAuthors, Authors. I use > sfWidgetFormDoctrineChoiceMany and I want that default author was > author with id = 2 but I can't do that. The default author is author > with id = 1 - WHY ?? My code: > > $this->setWidget('authors_list', new > sfWidgetFormDoctrineChoiceMany(array( > 'model' => 'Authors') > ))); > > $this->setValidator('authors_list', new sfValidatorDoctrineChoiceMany > ( > array('model' => 'Authors', 'required' => true), array() > )); > > $this->setDefaults(array( > 'authors_list' => 2 > )); -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.