@@ -490,9 +490,10 @@ sport like this::
490490 $positions = null === $sport ? array() : $sport->getAvailablePositions();
491491
492492 $form->add('position', 'entity', array(
493- 'class' => 'AppBundle:Position',
493+ 'class' => 'AppBundle:Position',
494494 'placeholder' => '',
495- 'choices' => $positions,
495+ 'choices' => $positions,
496+ 'choices_as_values' => true,
496497 ));
497498 }
498499 );
@@ -553,9 +554,10 @@ The type would now look like::
553554 $positions = null === $sport ? array() : $sport->getAvailablePositions();
554555
555556 $form->add('position', 'entity', array(
556- 'class' => 'AppBundle:Position',
557+ 'class' => 'AppBundle:Position',
557558 'placeholder' => '',
558- 'choices' => $positions,
559+ 'choices' => $positions,
560+ 'choices_as_values' => true,
559561 ));
560562 };
561563
@@ -616,7 +618,7 @@ your application. Assume that you have a sport meetup creation controller::
616618 }
617619
618620 return $this->render(
619- '@App/Meetup /create.html.twig',
621+ 'meetup /create.html.twig',
620622 array('form' => $form->createView())
621623 );
622624 }
@@ -631,7 +633,7 @@ field according to the current selection in the ``sport`` field:
631633
632634 .. code-block :: html+twig
633635
634- {# app/Resources/views/Meetup /create.html.twig #}
636+ {# app/Resources/views/meetup /create.html.twig #}
635637 {{ form_start(form) }}
636638 {{ form_row(form.sport) }} {# <select id="meetup_sport" ... #}
637639 {{ form_row(form.position) }} {# <select id="meetup_position" ... #}
0 commit comments