Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

form_row block override in form theme does not work for checkbox #515

Copy link
Copy link
Closed
@emodric

Description

@emodric
Issue body actions

I tried adding an override for form_row block in app/Resources/views/form/layout.html.twig:

{% block form_row %}
    MY OVERRIDE START

    <div>
        {{- form_label(form) -}}
        {{- form_widget(form) -}}
        {{- form_errors(form) -}}
    </div>

    MY OVERRIDE END
{% endblock %}

I also added a boolean property to one of the entities (for example Post), and corresponding checkbox field to PostType.

It turns out that form_row block override is not applied to Checkbox form type, and I couldn't find the reason why.

This is not an issue in Symfony nor an issue with version of PHP. I tested on PHP 5.6, PHP 7.1 and both show this behaviour. I also tested on Sylius (with Symfony 3.2) and it works okay there, so I think it is related to something in this demo.

If this is intended, how do I make the checkbox form type use my form_row override?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.