Create Effective Name Collection Form
Collecting user names is common in many applications, whether for user registration or creating a new contact. This article outlines best practices for creating an effective name-collection form that can make the application more inclusive and improve the user experience.
General principles
Consider the following principles when designing your name collection form:
- Be flexible: Accommodate various name lengths, formats, and scripts. For example, allow spaces, hyphens, apostrophes, and non-Latin scripts where appropriate, avoid enforcing a particular name structure that may exclude some users.
- Be transparent: Clearly explain how names will be collected and used. For example, explain the distinction between "Legal Name" and "Preferred Name", and how names will be displayed.
- Be inclusive: Respect how people identify themselves by providing options for non-binary gender, pronoun specification, and name updates associated with their account.
- Provide clear guidance and error messages: Avoid generic errors and provide examples of valid and invalid inputs. Consider providing virtual keyboards or examples for non-Latin scripts.
- Provide appropriate validation: Consider the unique characteristics of different writing systems and cultural norms when verifying user input accuracy. For example, group name input fields semantically for cultures where name order matters; for non-Latin name entries, validate with native speakers to confirm it is reasonable and culturally valid.
Best practices
This section provides best practices that reinforce the above principles.
-
Use separate fields for first name and last name, rather than a single "full name" field.
-
Make the fields flexible in length to accommodate names ranging from one to over 100 characters.
-
Allow for non-Latin scripts, such as Japanese, Chinese, Korean, Arabic, and Cyrillic.
-
Be transparent that you are collecting legal names and how the data is used. Consider separate "Legal Name" and "Preferred Name" fields to distinguish how an account may be created for compliance purposes while allowing the applicant to identify and be identified in a way that feels authentic to them. Explain how the names will be displayed.
-
Make the "Middle Name" field optional.
-
Some individuals may only have a single name and no last name, particularly recent immigrants. In these cases:
- Use a placeholder such as "FNU" (First Name Unknown) instead of the missing first or last name. For example, if the customer's only name is "Raj", record their name as "Raj FNU" or "FNU Raj". This allows your systems to have both a first and last name on record while respecting that the customer only uses a single name.
- If possible, copy the name directly from the user's official government-issued IDs, such as passports, driver's licenses or identity cards.
- Record the name exactly as shown on the documents, and explain any name conventions used to the user, such as using "FNU" as a placeholder. Communicate how the user's name will be displayed on records or bank statements.
-
Allow for spaces, apostrophes, hyphens, and periods in names.
-
Avoid auto-capitalizing name fields. Only capitalize if the user inputs the field that way.
-
Consider allowing a phonetic name or transliteration, but do not require it.
-
Avoid restricting name input to just 26 letters n the Latin alphabet. Offer additional letters like Ñ, Ð, or ê.
-
Make name prefixes and suffixes like "de", "la", or "Jr." optional.
-
For non-Latin scripts, consider providing a virtual keyboard, but also allow copy and pasting.
-
Group name input fields semantically for cultures where order matters, such as "Family name" and "Given name".
-
Do not enforce a Western structure on non-Western names, and do not require first/middle/last name.
-
Provide optional pronoun inputs like he/him, she/her, and they/them. Names do not imply pronouns.
-
Explain how names will be displayed and provide alias options.
-
Consider allowing non-binary gender options beyond just male or female, as some cultures recognize additional genders and people may identify outside the gender binary.
-
Use privacy safeguards to prevent potential fraud or harassment by avoiding displaying an individual's full name along with other personal details without their consent on public-facing services.
-
Consider a flexible regular expression for name validation, such as
^[^\d±!@£$%^&*_+§¡€#¢§¶•ªº«<>?\/:;|=]{1,240}$. -
Avoid generic validation error messages like "invalid name format". Provide clear guidance for the specific issue. See an example in the note below.
-
Allow people to update or change the name associated with their account, as names can change for various reasons including marriage, transition, or preference.
Note: validation error message example
The provided name value does not match the required format. The provided name must:
- Contain only letters, numbers, hyphens, apostrophes and accented characters
- Be between 1 and 240 characters in length
- Not start or end with a space
- Not contain consecutive hyphens or spaces
- Not contain numbers only
For example:
✔︎ Valid names:
- Josée
- O'Reilly
- Jean-Luc
✖︎ Invalid names:
- (starts and ends with space)
- --invalid name-- (contains consecutive hyphens)
- 123 (contains numbers only)
Please provide a name value that matches the required format and try again.
Updated 3 months ago
