Description
At http://symfony.com/doc/current/cookbook/form/dynamic_form_modification.html
in the 3rd example (Dynamic generation for submitted Forms), where they talk about the AJAX request (Twig example) is missing this template:
https://github.com/symfony/symfony-docs/blob/master/cookbook/form/dynamic_form_modification_ajax_js.rst.inc
The associated template uses some JavaScript to update the position form field according to the current selection in the sport field:
Twig
{# src/Acme/DemoBundle/Resources/views/Meetup/create.html.twig #}
{{ form_start(form) }}
{{ form_row(form.sport) }} {# <select id="meetup_sport" ... #}
{{ form_row(form.position) }} {# <select id="meetup_position" ... #}
{# ... #}
{{ form_end(form) }}
.. include:: /cookbook/form/dynamic_form_modification_ajax_js.rst.inc