Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 1.07 KB

form_theme.md

File metadata and controls

38 lines (27 loc) · 1.07 KB

form-theme

This bundle provide a form-theme under Resources/views/layout/form-theme.html.twig which allow customize the form elements in AdminTLE.

This is used as:

{% form_theme form '@AvanzuAdminTheme/layout/form-theme.html.twig' %}

For override the default theme in twig template you need put in the template which you want the new form theme

{% form_theme form 'your-custom-form-theme-layout.html.twig' %}

For example:

{% form_theme form 'bootstrap_3_layout.html.twig' %}

You also could apply this, only checking if a form is defined:

{% if form is defined %}
    {% form_theme form '@AvanzuAdminTheme/layout/form-theme.html.twig' %}
{% endif %}

Also is possible override the form theme by referencing multiple templates in order of priority or only customize/override some childs elements in the form like:

{% form_theme form.submit '@AvanzuAdminTheme/layout/form-theme.html.twig' %}