Hi, everyone I built an choice field from entity, but I want to make one of the options selected, is there any way to do that?
If I have "php", "sql", "mysql" which generated from category table, How can I make "sql" option selected after I show the page? Do I miss any method or setter? Or if I can make one option selected via twig template? part of my customized Type file ============================ // category query builder $categoryQb = $this->em->getRepository('Benefitz\DefaultBundle\Entity \Category') ->createQueryBuilder('c'); $builder->add('category', 'entity', array( 'required' => false, 'label' => 'Category', 'property' => 'name', 'class' => 'Benefitz\DefaultBundle\Entity\Category', 'query_builder' => $categoryQb )); -- 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