Skip to content

bootstrap 3 layout adds "form-control" on hidden inputs / csrf token inputs #16925

@michaelPf85

Description

@michaelPf85

Hello,

I've been using Bootlint recently to fix some mistakes on an application we're building. Most errors were on our side and we were able to fix, but one seems to come from symfony : Bootlint complains that our "form__token" hidden inputs use "form-control" class that is only available for text inputs.

I think this is the CSRF token input that SF automatically adds, I might be wrong on some point or term.

I located in bootstrap_3_layout.html.twig the block form_widget_simple that adds the "form-control" class on everything but "file" inputs. I modified it from or file != type to or ('file' != type and 'hidden' != type) and it works well. But I'm afraid this could miss some other errors, but other widgets seem to cover about everything (date, datetime, money...), or worse it could not be wanted :)

Would this be alright ? I suppose I might try to write some pull request if it's OK (this would be my first).

We're using Symfony 2.6.12 but I checked the master branch and this part was not changed.

Thanks for your feedback.

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