Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am working on a system that has several "date" fields, and the "Label" for it is actually a legend. When marked as "required", no red asterisk shows on the form entry. The attached is an image of the field, and then the code is as follows:
<label for="edit-field-last-name-und-0-value">Last Name <span class="form-required" title="This field is required.">*</span></label>
as opposed to:
<legend style="display: block;"><span class="fieldset-title fieldset-legend">Date of Birth </span></legend>
Comment | File | Size | Author |
---|---|---|---|
Screen Shot 2013-03-06 at 4.30.32 PM.png | 5.73 KB | usmccampbell |
Comments
Comment #1
usmccampbell CreditAttribution: usmccampbell commentedFor the time being, I have done the following to add the asterisk in a custom.js file inside of my theme folder.