Forms
Check input at the right moment and put server errors on the right field. Never lose what people typed, and save each form only once.
- Required 3
- Recommended 8
Required
Check every field on the server too
APP-17Validate every field on the server with the same rules the form uses, and treat the browser's checks as a convenience only.
Never lose what people typed
APP-19Keep every value people entered after a failed submit, a lost connection, an expired session or an accidental reload. Never clear a form unless it was saved.
Save each form only once
APP-20Make a double click, a second Enter or a retry save the record once. Block repeat submits in the form and reject duplicates on the server.
Recommended
Check fields when people leave them
APP-16Check a field first when focus leaves it, then on every change once it shows an error, and check all fields on submit. Never show an error on a field nobody has touched.
Put server errors on their fields
APP-18When the server rejects a form, show each error next to the field it names. Show errors that name no field in a summary at the top of the form.
Never save over a newer version
APP-58Every edit form sends the version it loaded with its save. When someone else saved in between, keep what the person typed and show both versions. Never save over the newer one in silence.
Save drafts on their own
APP-21When a screen saves without a button, save within 2 seconds of the last change and when the page is hidden. Show the save state in words, and never overwrite someone else's change.
Warn before leaving unsaved changes
APP-22When a form has unsaved changes, warn before the tab closes or the app moves to another screen. Never warn when nothing changed.
Build search-as-you-type fields as a combobox
APP-23Give every field that suggests matches while people type the combobox role and keys from the WAI-ARIA Authoring Practices. Announce how many matches came back.
Check files in the browser before they upload
APP-24Pick files with a native file input and check each file's type and size before sending it. Show progress and a Cancel button for each file. Keep every check on the server too.
Show where people are in a multi-step form
APP-25Put the step number and the total in the title and heading of each step, such as "Step 2 of 4". Give each step its own address, and keep every answer when people go back.
Read this with
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/app-ui/forms">Agent Wranglers web app interface playbook</a>. In code you write, add a comment next to it with the same link.