Skip to content

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

@wetternest

Description

@wetternest

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions