When composing an element with a form.class or via XML, prepend a '*' to the title to indicate a required field. This will cause the "element-required" class to be added to the label. pfSense.css contains the style associated with that class. (Currently a custom underline).
e.g.:
$section->addInput(new Form_Input( 'name', '*Name', 'text', $pconfig['name'] ))->setPattern('[a-zA-Z0-9_]+')->setHelp('The name of the alias may only consist '. 'of the characters "a-z, A-Z, 0-9 and _".');
Related issues
Bug #7083: Put back some visual hint for required fields
Fixed #7083
When composing an element with a form.class or via XML, prepend a '*' to the title to indicate a required field. This will cause the "element-required" class to be added to the label. pfSense.css contains the style associated with that class. (Currently a custom underline).
e.g.:
$section->addInput(new Form_Input(
'name',
'*Name',
'text',
$pconfig['name']
))->setPattern('[a-zA-Z0-9_]+')->setHelp('The name of the alias may only consist '.
'of the characters "a-z, A-Z, 0-9 and _".');