Patterns
Ask users for…
Email address
Use: Deployed
Follow this pattern to ask a user for an email address.
Usage
When to use this pattern
- When you need to collect an email address. For example, for contact information.
Examples
Default
How to design and build
How this pattern works
- Prepopulate email address from profile whenever possible. This makes it easier for users as they have one less field to complete.
- Adding an email confirmation field. The email confirmation field is unnecessary if we’re using the email from a profile. Also, it’s not useful for catching errors as most users copy and paste and don’t review their initial entry.
- If possible, tell users why you want their email address. Users need to know that the VA won’t abuse their email and which email they’d like to provide. An example message is: We may use your contact information so we can get in touch with you if we have questions about your application.
- Validate email addresses. You should validate email addresses so you can let users know if they have entered one incorrectly.
- Inform users when prefilling information from VA.gov profile. Notify users that information from their profile has been prefilled into the form. An example message is: We’ve prefilled some of your information from your account.
- Indicate to users whether an update in this form will update their VA.gov profile. Notify users that a change will not update their VA.gov profile. An example message is: Any updates you make here will only apply to this application.
- Pair with phone numbers. Collection of email address is paired with phone numbers. The two patterns typically appear on the same step/page.
Components used in this pattern
Page templates available for this pattern
Use the VADS templates (Patterns & Forms) for Names in Figma.
Code usage
emailPattern is a web-component pattern available in the Forms library.
Content considerations
Labels, error messages, and hint text
- Hint text: None
- Error type: No entry
- Error message: Enter a valid email address without spaces using this format: email@domain.com
- Error type 2: Invalid character
- Error message 2: You entered a character we can’t accept. Try removing "[specific characters entered]"