10000 Missing 'attr' config field in TextType doc · Issue #9949 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Missing 'attr' config field in TextType doc #9949

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

Closed
QuentinCurtet opened this issue Jun 22, 2018 · 3 comments
Closed

Missing 'attr' config field in TextType doc #9949

QuentinCurtet opened this issue Jun 22, 2018 · 3 comments
Assignees
Labels
Form hasPR A Pull Request has already been submitted for this issue.
Milestone

Comments

@QuentinCurtet
Copy link

Hello,

This doc : https://symfony.com/doc/current/reference/forms/types/text.html said that it's actually not possible to use "attr" option on a TextType but when we use it, it's ok and the 'attr' is affected to the field.

Example of config :

'id' => 'MyId',
'type' => TextType::class?
'options' => [
	'label' => 'MyLabel',
	'label_attr' => ['class' => 'control-label'],
	'attr' => ['class' => 'form-control']
]
@HeahDude
Copy link
Contributor

Hello @QuentinCurtet, thank you for opening this issue. The list of options if actually missing some inherited ones yes.
By checking all FormType options, you can see all of them as usable unless they appear in the (up to date) overridden section.

@HeahDude HeahDude added the Form label Jun 22, 2018
@HeahDude HeahDude added this to the 2.8 milestone Jun 22, 2018
@HeahDude HeahDude self-assigned this Jun 22, 2018
@QuentinCurtet
Copy link
Author

Ok, thanks for your return !

@javiereguiluz javiereguiluz added the hasPR A Pull Request has already been submitted for this issue. label Jul 19, 2018
javiereguiluz added a commit that referenced this issue Jul 20, 2018
This PR was merged into the 2.8 branch.

Discussion
----------

Added the missing attr option in TextType

Fixes #9949.

Commits
-------

ae11a5b Added the missing attr option in TextType
@javiereguiluz
Copy link
Member

Fixed by #10094.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Form hasPR A Pull Request has already been submitted for this issue.
Projects
None yet
Development

No branches or pull requests

3 participants
0