Addresses
About this pattern
This pattern helps users to provide an address using either:
- address lookup
- multiple text inputs
Only ask users for an address if this information is needed to deliver your site or service.
The address lookup needs a suitable back-end service to display addresses in response to a postcode search.
Make sure you tell your users what to do if they do not have a permanent address. For example, that they:
- cannot use the site or service without one
- need to contact you for help
- can use a forwarding or temporary address
Address lookup
The address lookup lets users search for a UK address by entering a postcode. When the user searches for a postcode they are shown a dropdown list of addresses in that postcode.
Users can correct or alter a postcode after they have performed a search, and can have the option of entering an address manually.
When using an address lookup you should:
- make it clear that it will only work for the country or area where you offer your service, for example UK-only addresses
- let users enter postcodes in upper or lower case, and with or without spaces
Unsuccessful searches
An error message should show when:
- an incorrect or invalid postcode is entered
- the user submits the address lookup with an empty postcode
When no matching addresses are found, you should explain what has happened and help the user understand what to do next.
Evidence
Address lookup has been tested as part of a complex form. Users interacted with the address lookup without difficulty and successfully located an address.
Manual address entry
The manual address entry pattern uses text input fields.
Website analytics
To understand user behaviour, you can track:
- postcode form submissions via the text input and the "find address" button
- the "change" and "Or type your full address" buttons or the address dropdown
- the validation error message
Use the Design System’s ‘tracking’ script to add the data attributes automatically.
Feedback, help and support
If you need help or support you can e-mail us at designsystem@gov.scot
There is a problem
Thanks for your feedback