Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add missing row_attr option to FormType #33688

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

Merged
merged 1 commit into from
Sep 25, 2019

Conversation

mcsky
Copy link

@mcsky mcsky commented Sep 24, 2019

Q A
Branch? 4.3
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix: #33682 - related issue #33573
License MIT

The #33573 modified Symfony's form themes. But the FormType don't allow the option row_attr so the OptionResolver throw an exception that the option is unknown.

This PR basically add the option and give it to the form view (like label_attr do)

@stof
Copy link
Member

stof commented Sep 24, 2019

This should actually be added in BaseType, so that ButtonType also benefits from it, not only FormType.

@mcsky mcsky force-pushed the fix/form_row_attr_option branch from b7d6d9d to d711ea2 Compare September 24, 2019 15:38
@mcsky
Copy link
Author

mcsky commented Sep 24, 2019

Good catch, PR updated

@fancyweb
Copy link
Contributor

Noticed this while working on #33573. Didn't change it because I thought it was like this on purpose and it is justified for me to offer this feature only in the theme. But by looking at #30320, it's clear the initial idea was to add the form option as well. Not really a fan of adding another theming form option though. Also, if we had this one, why don't we add the others ?

@xabbuh xabbuh added the Form label Sep 25, 2019
@xabbuh xabbuh added this to the 4.3 milestone Sep 25, 2019
@xabbuh
Copy link
Member

xabbuh commented Sep 25, 2019

Thank you @mcsky.

xabbuh added a commit that referenced this pull request Sep 25, 2019
This PR was merged into the 4.3 branch.

Discussion
----------

Add missing row_attr option to FormType

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix: #33682 - related issue #33573
| License       | MIT

The #33573 modified Symfony's form themes. But the [FormType](https://github.com/symfony/form/blob/master/Extension/Core/Type/FormType.php) don't allow the option `row_attr` so the OptionResolver throw an exception that the option is unknown.

This PR basically add the option and give it to the form view (like `label_attr` do)

Commits
-------

d711ea2 Add missing row_attr option to FormType
@xabbuh xabbuh merged commit d711ea2 into symfony:4.3 Sep 25, 2019
@fabpot fabpot mentioned this pull request Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants