Skip to content

Instantly share code, notes, and snippets.

@a-ast
Last active December 8, 2016 16:33

Revisions

  1. a-ast renamed this gist Dec 8, 2016. 1 changed file with 0 additions and 0 deletions.
  2. a-ast revised this gist Dec 8, 2016. No changes.
  3. a-ast created this gist Dec 8, 2016.
    9 changes: 9 additions & 0 deletions Symfony Forms: assign a theme for one field
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    {% extends 'base.html.twig' %}
    {# Set a theme for the whole form #}
    {% form_theme form 'bootstrap_3_layout.html.twig' %}
    {# Set a theme for the country field #}
    {% form_theme form.country 'bootstrap_3_horizontal_layout.html.twig' %}

    {{ form_start(form) }}
    {{ form_widget(form) }}
    {{ form_end(form) }}