Skip to content

Instantly share code, notes, and snippets.

@codl
Last active July 2, 2022 19:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codl/11314549 to your computer and use it in GitHub Desktop.
Save codl/11314549 to your computer and use it in GitHub Desktop.
Address forms suck

Address forms suck

It is an address form for illustration

I was looking at a package I got the other day and noticed the order of the address was wrong.

Addresses have very different formats in each country, yet every single website still asks me for my “State/Region”. This field is completely useless here in France, and many other countries. Sometimes it's a text box, and I don't know if I can leave it empty or if I have to input “N/A” or something else that will look stupid once printed on the package. Sometimes it's a drop-down list and I have to hunt down either the “Non-US” option, or maybe it was filled with French regions or French departments once I picked my country. I then have to guess which of the two it loaded and find my region or department accordingly, even though it will never be used by La Poste. In some extreme cases, there is no “Non-US” option and I have to pick a random US state just to continue.

And that's just one field! Let me make a quick list of other gripes I have with usual address input forms:

A proposal

So here's my idea for a next-generation address form:

<textarea name='address'></textarea>

I know how to type my full address. I know the syntax of French addresses. You probably do not. You certainly do not know every single country's address format. So why do you insist on taking my address in parts and then cobbling it back together?

There are no meaningful operations you can do on my broken down address bits that you can't do on my full formatted address. The only thing I can think of is choosing a different shipping company based on my country, or maybe deciding that you don't ship to my country, so I'll accept a country dropdown separate to the address. But, honestly, do you really need my “Address line 2” to be separate from my “Address line 1?”

Just let me handle my address, I know it better than you do.


PS: You should also get your encoding and escaping right. I don't live in rue Cuirassé Bretagne, nor rue Cuirass&eacute; Bretagne.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment