{% use "twig_form/bootstrap_3_layout.html.twig" %} {% block form_start -%} {% set attr = attr|merge({class: (attr.class|default('') ~ ' form-horizontal')|trim}) %} {{- parent() -}} {%- endblock form_start %} {# Labels #} {% block form_label -%} {% apply spaceless %} {% if label is same as(false) %}
{% else %} {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ block('form_label_class'))|trim}) %} {{- parent() -}} {% endif %} {% endapply %} {%- endblock form_label %} {% block form_label_class -%} col-sm-2 {%- endblock form_label_class %} {# Rows #} {% block form_row -%}
{{- form_label(form) -}}
{{- form_widget(form) -}} {{- form_errors(form) -}}
{##}
{%- endblock form_row %} {% block checkbox_row -%} {{- block('checkbox_radio_row') -}} {%- endblock checkbox_row %} {% block radio_row -%} {{- block('checkbox_radio_row') -}} {%- endblock radio_row %} {% block checkbox_radio_row -%} {% apply spaceless %}
{{ form_widget(form) }} {{ form_errors(form) }}
{% endapply %} {%- endblock checkbox_radio_row %} {% block submit_row -%} {% apply spaceless %}
{{ form_widget(form) }}
{% endapply %} {% endblock submit_row %} {% block reset_row -%} {% apply spaceless %}
{{ form_widget(form) }}
{% endapply %} {% endblock reset_row %} {% block form_group_class -%} {%- endblock form_group_class %}