{% use "bootstrap_4_layout.html.twig" %} {# Labels #} {% block form_label -%} {%- if label is same as(false) -%}
{%- else -%} {%- if expanded is not defined or not expanded -%} {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' col-form-label')|trim}) -%} {%- endif -%} {%- set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ block('form_label_class'))|trim}) -%} {{- parent() -}} {%- endif -%} {%- endblock form_label %} {% block form_label_class -%} col-sm-2 {%- endblock form_label_class %} {# Rows #} {% block form_row -%} {%- if expanded is defined and expanded -%} {{ block('fieldset_form_row') }} {%- else -%} {%- set widget_attr = {} -%} {%- if help is not empty -%} {%- set widget_attr = {attr: {'aria-describedby': id ~"_help"}} -%} {%- endif -%}