开发者

what is the best way to show mandatory field in a form using css

is there a standard best practice to show that a form field is mandatory:

  1. highlight the label in bold ??
  2. change the backcolor or border of the input textbox ??

is there any css s开发者_开发百科tandards or suggestions of having some visual indicator that a field is mandatory that will be recognized as universally as possible.


It's common practice to use an asterisk on the label. Is it common practice because it's a good method, or is it just common practice because of habit? I don't know.

I know I'm not a big fan of it. I generally encourage:

  1. Really think about each field. Do you REALLY need to require it? Can you ask for the info later? Can we shorten the form down so it's only the fields we really need?

  2. If we've reduced the fields down to only those that we really need, then we can just way all fields are required.


The subject and many other interesting subject are discussed here. You can download/view the video from Microsoft's MIX10 here. I like the video because there are many good examples which explain all more clear.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜