Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Readd 'form_label_errors' block to disable errors on form labels#26408
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
Nyholm commentedMar 5, 2018
Thank you for this PR. Btw, This is afeature and not a bug. Protip: There is no need of closing the PR and open a new one. Just push your changes to the same branch and the PR will be updated. |
birkof commentedMar 5, 2018
Made the previous pull request in the wrong branch and it collects all the differences & shown as comments... that's why I prefer to close it & open another one. Thanks! |
Simperfit commentedMar 6, 2018
@Nyholm This a is a new feature that we want to introduce in the 3.4 branch, shouldn't it go to master instead ? |
Simperfit commentedMar 6, 2018
@birkof Thanks for the first contribution on symfony! ;) |
Nyholm commentedMar 6, 2018
Okey, Lets consider it a bugfix then. It is for users that does not use |
ostrolucky commentedMar 7, 2018
If somebody needs to do this on per-field basis, this is better approach: {{ form_label(addUserForm.userByEmail,null, {errors: []}) }}If you want to disable all errors for form, you can currently do this: {%form_themeaddUserForm_self %}{%blockform_errors %}{%endblock %}This PR is still a bit different though, because someone might want to disable errors in labels, but not errors via |
Nyholm commentedMar 7, 2018
Exactly. The point is not to disable errors. The point is to disable errorsin labels. |
birkof commentedMar 8, 2018
@ostrolucky didn't know you could disable errors per-field like that. Thanks for the hint! |
veteran29 commentedMar 15, 2018
Asform_errors call was removed fromform_row in thiscommit, will disabling errors in labels cause error blocks to be not rendered at all? A simple way to restore old behavior could be useful as errors in labels don't play nice with some Bootstrap 4 themes. |
Nyholm 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.
Im 👍
fabpot commentedMar 18, 2018
Thank you@birkof. |
…orm labels (birkof)This PR was merged into the 3.4 branch.Discussion----------Readd 'form_label_errors' block to disable errors on form labels| Q | A| ------------- | ---| Branch? | 3.4| Bug fix? | no| New feature? | yes <!-- don't forget to update src/**/CHANGELOG.md files -->| BC breaks? | no <!-- seehttps://symfony.com/bc -->| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->| Tests pass? | yes <!-- please add some, will be required by reviewers -->| License | MITRe-added **form_label_errors** block on bootstrap 4 form themes.You can disable errors shown on form labels by simply extend bootstrap4 layout and empty **form_label_errors** block. See below:```{% use "bootstrap_4_layout.html.twig" %}{# Disable errors shown on form labels #}{% block form_label_errors %}{% endblock form_label_errors %}```Block previously removed [here](b375957#diff-62cb2a10f5a37db0e87e3bd81609b17dR186) by@nicolas-grekas.cc@NyholmCommits-------5b4354f Readd 'form_label_errors' block to disable errors on form labels
Uh oh!
There was an error while loading.Please reload this page.
Re-addedform_label_errors block on bootstrap 4 form themes.
You can disable errors shown on form labels by simply extend bootstrap4 layout and emptyform_label_errors block. See below:
Block previously removedhere by@nicolas-grekas.
cc@Nyholm