{% use "bootstrap_3_layout.html.twig" %} {% block form_row -%} {% set showErrorIcon = (not compound or force_error|default(false)) and not valid %}
{{- form_label(form) -}} {% if help|default %} {# set the aria-describedby attribute #} {%- set attr = attr|merge({'aria-describedby': 'help-block-'~id }) -%} {% endif %} {{- form_widget(form, { 'attr': attr }) -}} {% if help|default %} {{ help }} {% endif %} {{- form_errors(form) -}}
{%- endblock form_row %}{% block form_widget_simple -%}{% set showErrorIcon = false %}{% if type is not defined or type not in ['file', 'hidden'] %} {# show error icon for these types #} {% set showErrorIcon = (not compound or force_error|default(false)) and not valid %}{% endif %}{{- parent() -}}{% if showErrorIcon %} {% endif %}{%- endblock form_widget_simple %}