I don\'t find the oft-used \"*\" to be very nice looking - can anyone suggest a nicer-looking method or point me to an example?
I tried making the field highlighted
Might want to check out www.PeterBlum.com - His Professional Validation Package rocks for validating and formatting of controls. He has tutorials for using and numerous examples as well as a detailed manual.
If you use stylesheets to format your HTML, then you can create a style for .mandatory
. As an example, set the mandatory input to use this style, then you can play with it more easily until you have the right mix of color, border, and other style elements to suit your overall design.
HTML
<input id="username" type="text" class="mandatory" />
CSS
.mandatory {
color: red;
font-size: 12pt;
font-weight: bold;
font-style: italic;
}
I also use the asterisk as the OP mentioned as a "backup".
-R
I've found the answers on LukeW.com to be the most useful. because there isn't a simple solution here. It depends on what percentage of the fields are required, how many fields are in your form, and how long your labels are. For the vast majority of the web, people understand bold to be required, and normal-weight to be optional (if any options are bolded). Only after form validation fails would I present the user with the required-yet-skipped input boxes highlighted.