āFormā Component
Design: zeplin.
Form elements are ubiquitous and used throughout the site, from member profiles to conversation threads and course quizzes. Good, consistent form design based on accessibility and usability principles help ensure pleasant form-filling experiences.
Less is More
For forms, less is better. Reduce or eliminate unneeded forms, because more form fields will reduce the completion rate.
- Remove as many optional fields as possible.
- Mark all optional fields by adding ā(optional)ā at the end of the field label. This also makes it clear to the designer when a form has too many optional fields.
- Always explain why we ask for sensitive information, such as a personās phone number or address.
Facilitate Data Input
In most cases, data input is a chore. Help users by making it a faster and easier process.
- Show hint text within a field for potentially confusing or complex fields.
- Donāt show hint text for simple fieldsāe.g. nameābecause it may come across as condescending.
- Use geo-location or postcode lookup services to help fill in addresses.
- Whenever possible, donāt split a field up. For instance, ask for āFull nameā rather than āFirst nameā and āLast nameā.
- Include the proper input type markup so that the right mobile keyboard is shown.
- Donāt show a āClear fieldā or āCancelā button on a form because it will reset all fields. The user can close the window or go to the previous page if they want to abandon the form.
- On password fields, allow users to toggle the visibility of the password they enter.
Errors
- Whenever possible, use frontend form validation. This allows timely error messages to be shown as the user is filling a form up, rather than after the form is submitted.
- Trigger frontend validation only 700ms after a user has stopped typing, or after the user moves to another field. This
- prevents overzealous error messages from appearing as the user is typing.
- Use backend form validation as a last resort, when frontend validation is not possible or feasible.
- Show error messages at the field with the error.
- Error messages should sound human. They should be clear and jargon-free.
- Never blame the user for an error.