-1

I have a problem with bootstrap (4.5.2) added to Symfony project(5.1.3).

I've added all links from starting-template to base.html.twig file:enter image description here

Everything from bootstrap works properly(for example NavBar) excluding forms. It means, inputs does not have "bootstrap style" "out of the box". I am sure it was working in previous versions of Bootstrap/Symfony but not now. Maybe I missed some command or now I need to set something but I don't know what.

Here is how it is looking right now: enter image description here

What I expect "out of the box": enter image description here

I know that if I'll add "form-control" class I'll achieve this but earlier it was working automatically.

Does anybody know how can I solve this?

Greetings

mmcib
  • 131
  • 1
  • 10
  • From my experience you have to have at least the `form-control` class on the input elements in order to get the basic styling to work. If you remove that you will get the un-styled results you show in your picture. – crazymatt Aug 17 '20 at 15:27

1 Answers1

3

You need to pass a config in config/packages/twig.yaml

twig:
    form_themes: ['bootstrap_4_layout.html.twig']