Skip to content

Unable to add class to form widget #94

@gelhaimer

Description

@gelhaimer

Hello there,

I'm trying to add class attribute to some of my form's widgets.

I tried add this class from both the FormType and the twig template.

{{ form_widget(form, { 'attr' : {'class' : 'my_custom_class' } } }}

The admin bundle set widget's class attribute with "form-control form-control" (which is strange since the class is repeated twice). I would expect both my custom class and the one of the template theme.

As soon as I disable the bundle, my custom class is properly set.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions