Hi, I'm using the EntityChoiceField, and I encountered two issues : 1) when modifying the querybuilder, the value in the html option tag is not the one corresponding to the label of the option tag 2) I only get one single option tag in my select, whereas I have multiple rows in my db table, even when specifying the setMaxResults()
Here is the call : $this->add(new EntityChoiceField('nationalité', array( 'property_path' => 'nationality', 'em' => self::$oEM, 'class' => 'Ratethestar\\MainBundle\\Entity\ \Nationality', 'property' => 'label', 'query_builder' => function($repository) { return $repository->createQueryBuilder('n')- >orderBy('n.label', 'ASC')->setMaxResults(100); } ))); Oh, last thing : how do you get the EM from a Form ? I had to create a static field and provide it with the EM before creating my form. Thank you all ! PS : still can't generate repositories :'( -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@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