Yes but no result - I can selected this options in JavaScript but in Symfony in setDefaults() I can't - why ?
On 26 Lis, 16:37, Grégoire <gregoire.marc...@gmail.com> wrote: > 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.