Symfony 2.6 - render individual choice field (radio, checkbox) by name
问题 How can I render an individual field (single radio/checkbox input field) in Twig in Symfony 2.6? Let's say I have a simple form: class TransportType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('transport', 'choice', array( 'choices' => array( 'road' => 'Car/bus', 'train' => 'Train', ), 'expanded' => true, 'multiple' => false )); } In previous Symfony2 versions I could just use: {{ form_widget(form.transport.road) }} {{ form