{% form_theme form _self %} {#for some reason twig does not find the custom layout file, this works though #} {% use 'bootstrap_4_horizontal_layout.html.twig' %} {% block form_label_class -%} col-sm-4 {%- endblock form_label_class %} {% block form_group_class -%} col-sm-8 {%- endblock form_group_class %} {% block form_label -%} {# just make sure that it is rendered as label#} {% set compound = false %} {{ parent() }} {%- endblock form_label %} {% block date_widget -%} {% spaceless %} {% if widget == 'single_text' %} {{ block('field_widget') }} {% else %} {% set widget_attr = block('widget_container_attributes') %}