Skip to content

Update choice.rst #9071

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
wants to merge 2 commits into from
Closed

Update choice.rst #9071

wants to merge 2 commits into from

Conversation

jmangarret
Copy link
Contributor

FIX parametro atributo para añadir clase css

FIX parametro atributo para añadir clase css
//Version 3.3 no funciona choice_attr.
//Lo correcto es
//'attr' => array('class' => 'form-control')

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hola @jmangarret!

Hay dos opciones distintas: attr y choice_attr. La diferencia es que attr affecta el form control principal (e.g. el elemento select) mientras choice_attr se aplica a los elementos option. Pero, es cierto que no tenemos un ejemplo en esta página de attr. Por eso, yo he cambiado este PR para arreglar el problema.

@weaverryan
Copy link
Member

I've updated the PR - we had no mention of the attr option before, so I think it was confusing (all you saw was choice_attr, which is not what you want if you want to add a class to the select element, not the option).

@jmangarret
Copy link
Contributor Author

jmangarret commented Jan 18, 2018 via email

@jmangarret
Copy link
Contributor Author

jmangarret commented Jan 18, 2018 via email

@javiereguiluz
Copy link
Member

@jmangarret we're sorry but on this repository we don't provide Symfony support. You can use any of the channels listed here: https://symfony.com/support For example, in the Symfony Slack there's a #support channel for questions in English and a #symfony-es channel for questions in Spanish.

@javiereguiluz javiereguiluz added this to the 2.7 milestone Jan 19, 2018
javiereguiluz added a commit that referenced this pull request Jan 19, 2018
This PR was submitted for the 3.3 branch but it was merged into the 2.7 branch instead (closes #9071).

Discussion
----------

Update choice.rst

FIX parametro atributo para añadir clase css

Commits
-------

f78b89e Adding the missing attr option to the ChoiceType
58a3043 Update choice.rst
@jmangarret
Copy link
Contributor Author

jmangarret commented Jan 19, 2018 via email

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.

4 participants