Following Manual Instructions for Bootstrap 3 forms getting yml config error Following Manual Instructions for Bootstrap 3 forms getting yml config error symfony symfony

Following Manual Instructions for Bootstrap 3 forms getting yml config error


In newer Symfony versions, you must use form_themes instead of form.resources:

# app/config/config.ymltwig:    form_themes: ['bootstrap_3_layout.html.twig']

And, you don't need to add this to your templates:

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

You can safely remove that tag and forms will still use the Bootstrap form theme (because you configured it globally in config.yml file).

This is the official documentation about this: http://symfony.com/doc/2.6/cookbook/form/form_customization.html#making-application-wide-customizations


Probably the doc is mysaligned for the related framework version.

Try this:

config.yml

twig:    form_themes:        # Bootstrap:        - bootstrap_3_layout.html.twig

take a look at the TWIG bundle documentation here to see a full doc of the related bundle configuration.

Hope this help