File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,7 +158,9 @@ if ( $error_msg ) {
158158</%perl>
159159 <span id="<% $CFHintId %>" class="form-text invalid-feedback cfinvalidfield d-inline-block"><% $error_msg %></span>
160160% } elsif ($ShowHints and $CustomField->FriendlyPattern) {
161- <span id="<% $CFHintId %>" class="form-text cfhints d-inline-block">
161+ % my $pattern = $CustomField->Pattern;
162+ % my $pattern_allows_empty = '' =~ m/$pattern/ ? 1 : 0;
163+ <span id="<% $CFHintId %>" class="form-text cfhints d-inline-block<% $pattern_allows_empty ? '' : ' required' %>">
162164 <% $CustomField->FriendlyPattern %>
163165 </span>
164166% }
Original file line number Diff line number Diff line change @@ -682,3 +682,13 @@ div.label svg[height="12"] {
682682.form-check .has-text-input input .form-check-input {
683683 margin-top : 0.6rem ;
684684}
685+
686+ /* display a red asterisk beside labels for required custom fields */
687+ div .col : has (span .cfhints .required ) div .rt-label label ::after {
688+ color : var (--bs-form-invalid-color );
689+ content : ' *' ;
690+ font-size : 1.1em ;
691+ font-weight : bold;
692+ position : relative;
693+ top : 0.2em ;
694+ }
You can’t perform that action at this time.
0 commit comments