Forms
We use a form to collect a set of information that we need from the user.
Input fields
Avoid optional fields
Try to avoid optional fields. But when we do use them, we add ‘(optional)’ after the label text, rather than use * to indicate required fields.
Spacing/grouping
When a form has different sections or topics, organise the content into logical groups to aid scanning and completion. Use a standard divider to separate content (see component library).
How it behaves
Action buttons
Make it clear when the form is being processed
Disable all buttons and clearly communicate when the form is being processed to avoid duplicate submissions.
Validation
Inline validation
If something’s not right, we should let the user know as soon as they’ve entered the data and clicked outside the field. This means they can see and correct any errors faster, without having to wait until they’ve clicked the ‘Submit’ button.
Validate after field is filled in
Validation cannot verify before user finished typing an answer.Forms that validate during data entry punish the user as soon as they start entering data.