Closed akslay closed 1 day ago
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
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: