Creating (More) Usable Forms By Rachel Maxim | Blogging at...nowhere! Someday at Adrocknaphobia.com…
Outline Form contents –Only collect as much information as you need –Only require fields that are essential –Select the right form format (single/multi- page) Control types and usage –Choose controls for ease of use, us caution with custom form controls –Consider both keyboard and mouse entry –Prevent errors in entry –Avoid confusing or dangerous buttons Form layout, styling and design –Keep it clean and simple –Position of labels and fields for readability and usability –Group related fields and separate sections visually –Size and align form fields consistently and appropriately –Denote required fields clearly –Style primary and secondary action buttons for clarity Validation –Give instant feedback with client-side validation –Give clear and pointed feedback with server- side validation –Give meaningful validation messages –Don’t make users reenter good data when validating User considerations –Keep accessibility principles in mind –Support international addresses where applicable (and that includes you!) –Explain fields and formats clearly –Be flexible –Show the user where they are in the process –Give shortcuts, don’t make them enter twice –Think about your audience –Make confirmation pages informative Implementation –CF –CSS
Why is form design critical? It’s how your users contact you It’s how your customers pay you money A data entry clerk somewhere may spend their entire day using that form Getting your users to use the form is preferable to them “stopping by” your office It’s how your database receives information If someone encounters problems with a form, they may abandon your site forever.
Aspects of Form Design Contents Controls Layout, styling and design Validation Users
Which would you rather use? Are all your users named “asdf”….?
Required fields are not always required.
Single Page vs Multi Page Forms If you have more than 1-2 full screens, you may want to split it into logical steps If so, group related form fields into pages Let the user know which step they are at and how many there are Allow them to go back and forth without error or loss of data Allow them to save progress if it’s long
Don’t be a control freak.
Mouse, Keyboard, Mouse
Make it Hard to Make Mistakes
Keep It Clean and Simple
Meaningful Validation BAD: Please complete all required fields (marked with red *) BAD: An error has occurred in your form, some information is incomplete or invalid. BETTER: Please provide your address. / The address you entered is not valid. Please try again.
Client-side Validation
Server-side Validation
Be Flexible
Where Am I? Step 2 of 6 Step 2 of 6 Sign in > Shipping > Payment > Gift Wrap > Confirm > Receipt
Be Thoughtful Give shortcuts – don’t make them enter info twice Consider the age/ demographics, level of computer/internet knowledge, and disabilities or impairments of your audience (imagine your grandmother filling out this form…) Make confirmation pages informative Not just “Thank you.” “you can expect a response in xx days” “for further information, see our FAQ” “your information has been sent to xyz, you may also call our 800 number…”
A Word About Flash Forms Detect the plugin and version Have an HTML alternative Use standard controls such as the Flash UI components Use “special” controls judiciously In Flash, turn Accessibility on
CF Resources CFFORMs - Livedocs IsValid(type, value) isValid("range", value, min, max) isValid("regex" or "regular_expression", value, pattern) CFLib.org – string manipulation functions and regex examples that work if you don’t have CF 7
JavaScript Resources Qforms: et:qforms et:qforms DynamicDrive: Yahoo! UI Library: Google Web Toolkit:
CSS/Design Articles AListApart SitePoint forms forms LukeW Design Jakob Nielsen (usability books & site) bin/MsmFind.exe?QUERY=forms bin/MsmFind.exe?QUERY=forms 37Signals – Defensive Design for the Web