Skip to content
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

Webform | Multi-select fields receiving duplicate required asterisks #3453

Closed
akslay opened this issue May 30, 2024 · 1 comment · Fixed by #3519
Closed

Webform | Multi-select fields receiving duplicate required asterisks #3453

akslay opened this issue May 30, 2024 · 1 comment · Fixed by #3519
Assignees
Labels
bug Something isn't working

Comments

@akslay
Copy link
Contributor

akslay commented May 30, 2024

Problem/Motivation

Webforms with multi-select fields (checkboxes, checkboxes other, radios, radios other, etc.) are receiving duplicate required asterisks.

Examples on live sites:

Describe the bug

The .form-required class is being applied to both the <legend> element and the <span> nested inside it, resulting in two asterisks.

To Reproduce

Create a Webform with a checkboxes field (multiple options), and make it required.

Proposed resolution

I was unable to find a drupal.org issue for this problem. Seems like it might be stemming from a QS template (themes/custom/az_barrio/templates/forms/fieldset.html.twig) on Line 38 & Line 46.

Expected behavior

Only one asterisk per required Webform field.

Screenshots

Example 1:

Example 2:

@akslay akslay added the bug Something isn't working label May 30, 2024
@akslay akslay added this to the 2.10.x Patch Release Issues milestone May 30, 2024
@akslay akslay changed the title Webform | Multi-select fields receiving dupplicate required asterisks Webform | Multi-select fields receiving duplicate required asterisks May 30, 2024
@akslay akslay self-assigned this Jul 1, 2024
@akslay
Copy link
Contributor Author

akslay commented Jul 1, 2024

Barrio adds the .*-required classes to the <span>, and not the <legend>, so I will remove the duplicate classes from the <legend>.
https://git.drupalcode.org/project/bootstrap_barrio/-/blob/5.x/templates/form/fieldset.html.twig

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant