8000 Form theme foundation 5 does not support html labels for checkbox and radios · Issue #53925 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Form theme foundation 5 does not support html labels for checkbox and radios #53925

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
wetternest opened this issue Feb 13, 2024 · 0 comments
Closed

Comments

@wetternest
Copy link
Contributor
wetternest commented Feb 13, 2024

Symfony version(s) affected

6.4, 7.0, 7.1

Description

The Symfony form theme "foundation 5" ignores the attribute label_html=true for checkboxes and radios

How to reproduce

  • create a form
  • add a checkbox or radio
  • set attribute label with some html in it
  • set attribute label_html to true
  • render the form using the theme foundation_5_layout.html.twig

SHOULD:

  • the html in the label should be rendered

IS:

  • the html in the label is shown as is

Possible Solution

use block form_label_content to render the label content

Additional Context

No response

@wetternest wetternest added the Bug label Feb 13, 2024
nicolas-grekas added a commit that referenced this issue Feb 15, 2024
…lock for checkbox and radio labels (wetternest)

This PR was squashed before being merged into the 6.4 branch.

Discussion
----------

[TwigBridge] foundation 5 layout: use form_label_content block for checkbox and radio labels

…dio labels

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        | Fix #53925
| License       | MIT

[Twig Bridge] Foundation5 Form Layout

use the block `form_label_content` to display the label content of checkboxes and radios in order to support the `label_html` flag

Commits
-------

e4eca7c [TwigBridge] foundation 5 layout: use form_label_content block for checkbox and radio labels
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
0