Page Loading

Address lookup component

The address lookup field allows users to search for and select their address from a database. This helps to reduce human error when entering an address, and maintains data integrity.

Example

How to use the address lookup

Use the address lookup to help users search for a business address. Make sure you include useful placeholder text or help text to let the user know what they can search for.

In the help text for this field, you may also want to clarify if it's a trading address or registered address you're looking for, and what the difference is.

Error messages

Error messages for this field are slightly more complex than other form fields. In some cases, we display a generic error message for the whole field, and in other cases we need to display individual error messages against each address field, such as address line 1 or post code.  

Here are some suggested error messages:

If the user doesn’t select an address from the dropdown and tries to submit the form, use the standard error summary pattern, using the message: “Search for and select your business from the dropdown, or enter your address manually”.

If the user selects an address from the dropdown but the address is missing mandatory fields, display this error message immediately, without waiting for the user to submit the form: “This address is incomplete. Fill in the missing fields or search again.” The form should then display all the individual address fields with individual error messages against each mandatory field that’s missing:

  • Enter your company name
  • Enter the first line of your address
  • Enter your town or city
  • Enter your company’s postcode

If the user submits an incomplete address, follow the standard error summary pattern, and display individual error messages for each field that’s missing.  

Adding the address lookup in the CMS

The address lookup field is included in the enquiry form template. At the moment, it’s not available to add to any other panels or components, and you can’t edit it in the CMS. If you need to make a change to the content or functionality of the address lookup, get in touch with Louise Spence.

Accessibility

The address lookup field can be accessed by keyboard and other assistive technology.  

We use ARIA code to help users with assistive technology like screen readers use the field.