{% block custom_field_title_widget %} {{ form.vars.attr.title }} {% endblock custom_field_title_widget %} {# render an alement in a choice list #} {% block cf_choices_list_widget %} {{ form_row(form.name) }} {{ form_row(form.active) }} {{ form_row(form.slug) }} {% endblock cf_choices_list_widget %} {# render the possibility to add different elements in a choice list #} {% block cf_choices_widget %} {{ form(form) }} {# we use javascrit to add an additional element. All functions are personnalized with the id ( = form.vars.id) #} {% endblock cf_choices_widget %} {% block choice_with_other_widget %}

echo

{%- for child in form.children._choices %} {%- if child.vars.value == '_other' -%} {{- form_widget(child) -}} {{- form_widget(form.children._other) -}} {%- else -%} {{- form_widget(child) -}} {{- form_label(child) -}} {%- endif -%} {% endfor -%}
{% endblock choice_with_other_widget %}