Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to add class to form widget #94

Open
gelhaimer opened this issue Feb 21, 2016 · 2 comments
Open

Unable to add class to form widget #94

gelhaimer opened this issue Feb 21, 2016 · 2 comments

Comments

@gelhaimer
Copy link

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.

@shakaran
Copy link
Collaborator

@GregOriz if you could watch the code and find a good solution, please make a pull request for it, I could review it, if not I will try to reproduce and fix more later

@shakaran shakaran added this to the Version 2.0 Stable milestone Sep 28, 2017
@shakaran
Copy link
Collaborator

shakaran commented Oct 4, 2017

@GregOriz could try to reproduce the same behaviour with latest master branch? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants