Skip to main content

Addresses

Ask for addresses in parts

id: person's address
sets:
- person.address.address
- person.address.city
question: |
Person's Address
fields:
- code: |
person.address_fields()

Allow user to specify country if appropriate

If your users commonly may provide addresses from a different country, show a country dropdown. Store the country with the ISO country code.

Ideally, update fields to match at least the most common countries, by updating labels like Zip code to Postal code and replacing State with the appropriate label for that country.

id: person's address
sets:
- person.address.address
- person.address.city
question: |
Person's Address
fields:
- code: |
person.address_fields(show_country=True, country_code="US")

Not all users have an address

Some users may be unhomed. Consider fallback solutions that gracefully handle someone without a home.

Consider a fall back of a completely open text field

The most flexible input of all for an address is a wide-open text field. This may be appropriate to show as an alternative, even if your user is able to select the country, to handle countries with address formats that you may not know in advance.

Keep in mind that this may not be a very good user experience for most users. Your default address question should be more standardized.