Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Form] Add label_html attribute#31375
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
alexander-schranz commentedMay 9, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
As described in#31358 I think it totally make sense to have label_html attribute in it as we also have help_html attribute. 👍 for this. |
alexander-schranz commentedMay 13, 2019
@przemyslaw-bogusz the label is also used inside the button example and could contain html there also see:https://github.com/symfony/symfony/pull/31358/files |
AndreasA commentedMay 28, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Hi, just wondering will this make it into Symfony 4.3? |
przemyslaw-bogusz commentedMay 28, 2019
@AndreasA I've been busy preparing for SymfonyLive in Warsaw, but that's on the list of my priorities, so I will fix the tests and complete it as soon as I can. However, it doesn't mean it will be automatically approved. If you like the idea, give it a 'thumbs up' or leave a positive comment. |
AndreasA commentedMay 28, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I think this would be really helpful. Especially in combination with the |
alexander-schranz commentedJun 12, 2019
@przemyslaw-bogusz the tests seems to fail because $label_html is not define in the form_label.html.php not sure how this happens maybe you can try to debug the tests and try to fix it? |
przemyslaw-bogusz commentedJun 17, 2019
I've tried a different approach by implementing this feature in |
2617c46 tob4c0924Compareprzemyslaw-bogusz commentedFeb 10, 2020
@xabbuh I have started working on this some time ago, but I had problem with a single space, that which caused the tests to fail. I have fixed this, but there is still some issue with Travis on PHP 7.4. I could really use some help to solve this out, because there are a few people, who like this proposition -#35598. |
xabbuh commentedFeb 14, 2020
@przemyslaw-bogusz I think making sure that the Twig bridge always gets the Form component in version 5.1 or higher should solve it. We would need to make some changes to the Twid bridge's
|
przemyslaw-bogusz commentedFeb 14, 2020
@xabbuh Thanks a lot. That solved the issue. However, now there is a single test in Cache Component failing. |
fabpot commentedFeb 15, 2020
It looks like this PR contains not related commits. Can you rebase and force push? |
nicolas-grekas left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
(I rebased + squashed)
HeahDude left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks! We also need a note in the form component CHANGELOG.
przemyslaw-bogusz commentedFeb 15, 2020
I have updated the form component changelog. Sorry for the mess with the commits and thanks for the cleanup. |
Uh oh!
There was an error while loading.Please reload this page.
5a25ef1 toab9f795Compareab9f795 to02d9f0bCompareprzemyslaw-bogusz commentedFeb 28, 2020
I removed the CHANGELOG update, and without AppVeyor CI is green again. |
javiereguiluz left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Nice and useful feature!
nicolas-grekas commentedMar 12, 2020
Thank you@przemyslaw-bogusz. |
alexander-schranz commentedMar 12, 2020
@przemyslaw-bogusz good work nice to see this merged! |
przemyslaw-bogusz commentedMar 13, 2020
@alexander-schranz Thanks! I wish you all the best in future PRs. |
…bogusz)This PR was squashed before being merged into the master branch (closes#13316).Discussion----------[Form] Add description of label_html option| Q | A| ------------- | ---| Feature PR |symfony/symfony#31375| PR author(s) |@przemyslaw-bogusz| Merged in | WCMCommits-------7a74bb3 [Form] Add description of label_html option
…rzemyslaw-bogusz)This PR was squashed before being merged into the master branch (closes#13409).Discussion----------[Validator] Add description for AtLeastOne constraint| Q | A| ------------- | ---| Feature PR |symfony/symfony#31375| PR author(s) |@przemyslaw-bogusz| Merged in | 5.1-dev| Fixes |#13355Commits-------5ba5224 [Validator] Add description for AtLeastOne constraint
Uh oh!
There was an error while loading.Please reload this page.
I propose to add a new attribute to
BaseTypeclass so it is easy to include html tags in labels for, both, buttons and other elements that inherit fromFormTypeclass. This gives you an ability to add, e.g. a glyphicon to a button, or a link to a checkbox, simply inside theFormBuilder, which means you can just do{{ form(form) }}inside a template.
Sidenotes