Forums

Automatically Add Asterisk to Required Field

LikeStuff 06 Mar, 2013
Usually when a field is required there is an asterisk next to that field. Is there a way to automatically add an asterisk to a required field or do I have to add it manually.

Thanks!!
GreyHead 07 Mar, 2013
Hi LikeStuff,

There's nothing built in but this FAQ has some JavaScript that will do some of the work for you.

Bob

PS You could probably also use CSS to change the style of the labels but that might not work in older browsers.
LikeStuff 07 Mar, 2013
LOVE it! Thanks very much.

I really like the RED border on the left. However, is there a way to have the textarea or select inputs borders turn red ONLY if the user skips the field, the same way the "this field is required" popup message works where it only appears if the user tries to submit the form and shows the user the next required field.

Thanks in advance!!
GreyHead 07 Mar, 2013
Hi LikeStuff,

I'm sure that you could tie the CSS styling into the FormCheck validation 'onValidateFailure' event so that it shows up with the tooltip.

Bob
This topic is locked and no more replies can be posted.