Ask users for Names
Overview
Use the names pattern to ask users for their name.
When not to use this pattern
Do not ask for a user’s name if it is not essential to your service.
How to use this pattern
This pattern uses the input component.
If you are using one input field, you should use the label: “Full name”.
Make sure that the input field is long enough for users to enter their full name. You can make sure of this by using population data or any data available about your existing users.
It should be clear to the user whether they need to enter their legal name or common name.
Do not ask for the user’s title unless it is essential. This will reveal their gender and marital status, which they may not want to share.
If you are storing a user’s name, there should be a mechanism for them to change it if needed.
Do not use spellcheck on name fields. If you are using the spellcheck
attribute, set this to "false"
.
Multiple input fields
You should use a single input field where possible as some names do not fit the “first name”, “last name” format.
If you need to use multiple name fields:
- for downstream data processing reasons
- so that users can be linked using last names
- so that you can pipe in the first name later on in a service
You should use the labels: “First name”, “Middle names” and “Last name”.
Do not include “(optional)” after “Middle names”, users will skip this field if they do not have a middle name.
Help improve this page
Let us know how we could improve this page, or share your user research findings. Discuss this page on GitHub (opens in a new tab)