Standard solution: an accessible form
The robust recipe for input from the user
§Structure
- 01Link a clear label to each field
- 02Group related fields logically
- 03Clearly mark which fields are required
- 04Use field types that match the content (e.g. email, number, date)
§User-friendliness
- 01Provide clear error messages next to the field the error relates to
- 02Keep what the user has written if submission fails
- 03Make sure that the form can be filled using keyboard alone
§Safety
- 01Validate input in frontend as help to the user
- 02Always repeat all validation on the server — never trust the client
- 03Treat and store user data responsibly