diff --git a/Resources/views/Form/fields.html.twig b/Resources/views/Form/fields.html.twig index a097bc78f..76ec0cb5c 100644 --- a/Resources/views/Form/fields.html.twig +++ b/Resources/views/Form/fields.html.twig @@ -35,61 +35,37 @@ {# render the possibility to add different elements in a choice list #} {% block cf_choices_widget %} -{{ form(form) }} + {{ form(form) }} + + {# we use javascrit to add an additional element. All functions are personnalized with the id ( = form.vars.id) #} + + jQuery(document).ready(initializeCFChoiceOptionsChoices('{{ form.vars.id }}')); + {% endblock cf_choices_widget %}