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>
Members fund testing for the Drupal project. Drupal Association Learn more


usmccampbell’s picture

For the time being, I have done the following to add the asterisk in a custom.js file inside of my theme folder.

// JavaScript Document

(function ($) {
	$('#field-NAME-OF-FIELD-add-more-wrapper .fieldset legend').append('<span class="form-required" title="This field is required.">*</span>');