11 comments

[ 4.4 ms ] story [ 27.2 ms ] thread
Changing the label from "Address 2" to "Apartment, Suite, etc (optional)" and adding dynamic dropdowns for City, State, Country decreased the number of incorrect addresses for us by nearly 50%.

Although I can't claim credit I stole it from Shopify's checkout.

This approach seems best to me, rather than dealing with free form text and then trying to parse and cleanse that.
> trying to parse and cleanse that

But why would you? If you need to send something to the address you can just print the exact user input on the shipping label.

You might wabt to run some analytics on your data based on city, general area, etc. Also simplifies fraud detection.
> City, State, Country

Not all countries have states.

Yes, ‘two address lines’ is ad-hoc, but a user’s expectations may also not match the pattern: ‘a multi-line street number, name, apt #, etc; a zip; a city; a state.’

Should we get rid of auto-complete for state and city, using the zip, too, then? I don’t think so. But where to draw the distinction?

This is especially valid for forms that accept non-US addresses. It is such a pain to deal with assumed formats, length/charset limits or other restrictions put in place by devs who clearly have no idea how addresses work in other countries.
RIP devs that need to sanitize address data from random textarea inputs
until you need to integrate an api needing it seperated with a db full of free text