Overriding FOSUserBundle Login Form Overriding FOSUserBundle Login Form symfony symfony

Overriding FOSUserBundle Login Form


Because you didn't write the code that render the login form.

open /vendor/friendsofsymfony/user-bundle/FOS/UserBundle/Resources/views/Security/login.html.twig, copy the code in the fos_user_content block to your custom login.html.twig, reload the page, then you'll see the form.

If you want to customize the form, rewrite the code you've copied.


When you have nested blocks you need to tell explicitly which block you're closing. So, try this:

{% block content %}    {% block fos_user_content %}{% endblock fos_user_content %}{% endblock content %}