Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.2k
[Form] Add description of label_html option#13316
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Merged
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
nicolas-grekas added a commit to symfony/symfony that referenced this pull requestMar 12, 2020
This PR was squashed before being merged into the 5.1-dev branch.Discussion----------[Form] Add label_html attribute| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| License | MIT| Doc PR |symfony/symfony-docs#13316I propose to add a new attribute to `BaseType` class so it is easy to include html tags in labels for, both, buttons and other elements that inherit from `FormType` class. This gives you an ability to add, e.g. a glyphicon to a button, or a link to a checkbox, simply inside the `FormBuilder`, which means you can just do```twig{{ form(form) }}```inside a template.**Sidenotes**1. I have started working on this two days ago and it the meantime@alexander-schranz made a similar proposition in#31358. If necessary, I can close my PR and@alexander-schranz can include my suggestions inside his PR.1. I have just read in#29861 that@mpiot wanted to include this idea in his PR. With respect to@xabbuh's comments from that PR, I hope that my PR will be at least a good place to discuss, if the proposed feature is a good solution.Commits-------239fe04 [Form] Add label_html attribute
symfony-splitter pushed a commit to symfony/form that referenced this pull requestMar 12, 2020
This PR was squashed before being merged into the 5.1-dev branch.Discussion----------[Form] Add label_html attribute| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| License | MIT| Doc PR |symfony/symfony-docs#13316I propose to add a new attribute to `BaseType` class so it is easy to include html tags in labels for, both, buttons and other elements that inherit from `FormType` class. This gives you an ability to add, e.g. a glyphicon to a button, or a link to a checkbox, simply inside the `FormBuilder`, which means you can just do```twig{{ form(form) }}```inside a template.**Sidenotes**1. I have started working on this two days ago and it the meantime@alexander-schranz made a similar proposition in #31358. If necessary, I can close my PR and@alexander-schranz can include my suggestions inside his PR.1. I have just read in #29861 that@mpiot wanted to include this idea in his PR. With respect to@xabbuh's comments from that PR, I hope that my PR will be at least a good place to discuss, if the proposed feature is a good solution.Commits-------239fe04ff9 [Form] Add label_html attribute
@przemyslaw-bogusz thanks! We added the missing |
Thanks, I will try to remember about it next time. |
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading.Please reload this page.