Monday, February 21, 2011

How to show compulsory fields on a windows form

How should I show users which fields are compulsory in a windows forms application.

I have considered changing the label color or maybe the background color of the text box.

I use an error provider to show a red exclamation mark next to the field, however this is only visible after they have clicked the save button.

From stackoverflow
    • Asterisk or icon to the side of control
    • Red border when required validation fails (when user tries to save)
    • Bold Labels
    • Different background color for required controls (perhaps only when user tries to save)
    Rob : A firm, but not too thick red border sounds good to me.
    Jason Jackson : ... or any color that is complementary to the application's color scheme but stands out.
    John Rudy : What I've found works best is a different background for the controls, always visible. The color should be pastel, often yellow as seen in browsers. This usually looks OK on any given UI theme, and makes it eminently clear to the user what is/isn't required without taking up extra visual space.
    Argalatyr : (@John Rudy) Like my answer just below?
    Robert C. Barth : Using JUST a color to indicate required fields is usually not the best practice from an HCI perspective because: 1. blind users will never see it, and 2. color-blind users (of which there are way more than you think) /may/ not see it.
  • Yellow background would make it similar to many web forms. No idea whether there are any standards for Windows per se, though if there are I doubt they are widely used.

  • Use the errorprovider extension control.

    This places a red cross next to the control with a tooltip message.

  • I would use the ErrorProvider control, possibly with a different icon to represent "required" as opposed to "in error". I would also ensure the fields start with error icon shown next to them and the icon should only disappear once data has been provided for that field.

    Only doing validation/notification of missing data when the user tries to save seems way too late.

  • Something to consider is what users are accustomed to seeing for required fields. While not graphically spectacular, placing a simple asterisk next to required field is a very ubiquitous solution.

0 comments:

Post a Comment