IBM®
Skip to main content
    Country/region select      Terms of use
 
 
   
     Home      Products      Services & solutions      Support & downloads      My account     

developerWorks  >  Lotus  >  Forums & community  >  Best Practice Makes Perfect

Best Practice Makes Perfect

A collaboration with Domino developers about how to do it and how to get it right in Domino

Cruel ValidationPerhaps my readers can help me understand this. Is it some misguided impulse to control the user, that makes people design forms that validate a field the moment you leave it, and force you to fill in fields in a particular order? Do some developers think end-users like to be herded along like sheep? Or do they do it accidentally?

Especially pernicious is the "automatically refresh fields" form option, in combination with validation formulas that don't distinguish between refresh and save. You click a field midway down the form, the form refreshes to that point. So the validations for fields above that fire, and any required field you left blank insists that you fill in a value now. You can't get to the field you clicked on until you supply valid values for all the fields above it.

The problem is, people have a limited number of things they can keep in mind at a time. They clicked on that field for a reason. They have some information -- in their own short-term memory, or on the clipboard -- that they wanted to insert at that point. When a person's immediate goal is frustrated, they feel -- well -- frustrated. Having to satisfy the insistent earlier fields that will not let you get by without filling in a value, is a distraction from their goal. Choosing the right value can take time and take attention away from what the user sees as their task. There are three risks you run by this:

  • The user will choose a value carelessly so that they can get to the field they wanted, and forget to fix it later.
  • The user will take time to fill in the fields correctly, and forget the perfect turn of phrase that they were wanting to type into the Body field, that they had wanted to do first thing.
  • The user will become irritated with the developer and will decline to contribute to the pool to buy you a birthday present.
There's seldom a good reason anymore to use the "Automatically refresh fields" option, since we now have options on keyword fields to do a refresh -- or run more targeted code -- when the field is changed or exited. And if you do end up refreshing the form during editing -- because you have a subordinate keyword field and you have to refresh its choices, for instance -- it makes sense to write validation formulas that wait to complain until the user tries to save the document. For instance:

@If(@IsDocBeingRecalculated; @Success; @ThisValue = ""; "Please, sir or madam, fill in a value for the Reason field."; @Success)

Actually, even this is less than ideal. The user is only told about one problem at a time, so if there are multiple fields that fail validation, they're repeatedly trying to save and having to answer a complaint. Once again, they're trying to do something -- save the document, be done with it -- and they are stymied multiple times. The popular web paradigm is to do a single pass on the document and flag all the fields that are incorrect, so that the user can address them all before they try to save again, in the order that suits them. This is a smoother and more easy-going UI, and if you can afford to take the time to design your form this way, you will be lowering the general stress level of your users, and significantly improve your chances of getting a nice birthday present (make sure your name appears on the form).

Implementing this is a little involved; do any of my readers know of a good description of how to do this for the Notes client, step by step? So that I don't have to write it myself? Thanks.

Andre Guirard | 20 February 2008 09:34:00 AM ET | Home, Plymouth, MN, USA | Comments (18)

Search this blog 

Disclaimer 

    About IBM Privacy Contact