Skip to content

[Form] Issue with the ordering of global form themes #26879

Closed
@javiereguiluz

Description

@javiereguiluz
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version all

In this doc page (https://symfony.com/doc/current/form/form_themes.html) you can read:

If several custom themes are provided they will be searched in the listed order before falling back to the global theme.

However, with this config, my own theme modification doesn't work:

twig:
    # ...
    form_themes: ['_my_form_theme.html.twig', 'bootstrap_3_layout.html.twig']

I need to define this reverse order to use first my own theme blocks and then fallback to Bootstrap theme blocks:

twig:
    # ...
    form_themes: ['bootstrap_3_layout.html.twig', '_my_form_theme.html.twig']

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions