What's the best way to highlight a required field on a web form?

前端 未结 9 963
深忆病人
深忆病人 2021-01-02 00:04

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

相关标签:
9条回答
  • 2021-01-02 00:18

    I typically have no objections to seeing (required) in a smaller font either right below the field name or adjacent to the entry field.

    I could also see using a "textbox watermark" to have the field say "required" in it until they bring focus to the field and start typing.

    0 讨论(0)
  • 2021-01-02 00:20

    I like the way it is done in the ASP.NET Ajax Control Toolkit for the ValidatorCallout control:

    0 讨论(0)
  • 2021-01-02 00:25

    If you're going to use colour to highlight the field, bear in mind that some people are colour-blind (so maybe provide another indicator too)

    0 讨论(0)
  • 2021-01-02 00:26

    Generally speaking, the best web forms are the simplest ones that require me to think the least. The "standard" that has evolved is that required fields have an asterisk (*) next to them. Sometimes the asterisk is red to help it stand out a bit.

    Why fight the standard? Don't make your users think too much. Go with the standard and keep your creativity for more important things.

    0 讨论(0)
  • 2021-01-02 00:26

    Sometimes it really is justifiable to mark fields as mandatory and optional. However, before you do so, you should question whether it is reasonable to ask the user any non-mandatory information. This applies especially in registration forms.

    In registration forms and such, it is much better to ask only the minimum information. After the registration the user can, at will, fill out optional information in separate forms.

    After all the unnecessary cruft has been taken out from the form, you might see that there is no need to mark fields as mandatory; either everything is mandatory, or it might be so obvious to the user which fields are optional, that there would be no need to give visual cues about it.

    0 讨论(0)
  • 2021-01-02 00:35

    add style="border: thin red solid;" to the element

    0 讨论(0)
提交回复
热议问题