Section 9.6. Form Design


9.6. Form Design

As mentioned already, forms are the primary way for users to send data to your scripts, so it's essential that you get them right. Above and beyond the coding aspect of forms, there are a number of basic usability guidelines you should follow in your design :

  • Use stylesheets or tables to lay your elements out neatly. This makes the form easier to read, and it is also easier to report individual errors on fields.

  • If there is an error within a field, put a notice next to it and a message at the top of the page; otherwise, people may not realize there's a problem. You should also consider changing the color of the problem field to make it obvious which one is bad.

  • Mark required fields either with bold text or, more commonly, an asterisk *.

  • If your database has a field length limit, put a size limit on a text box to stop people from entering too much text and later finding out their data has been trimmed by your database.

  • Don't make your forms too longthey confuse people and make them feel threatened.

  • If you split your form across pages, let your visitors know how far they are in the process of form submission, e.g., "Page 2 of 5." This lets people know where they stand at all times, without leaving them wondering, "Will this next button take money out of my account, or are there more pages to come?"



PHP in a Nutshell
Ubuntu Unleashed
ISBN: 596100671
EAN: 2147483647
Year: 2003
Pages: 249

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net