Handling International Address Inputs
My first thoughts are as follows . . .
The most common fields for a US address are address 1, address 2, city, state, and ZIP. For international, ZIP Becomes "ZIP/Postal Code", you add a country drop down, and you need to add a region field and make sure state isn't optional. So a reasonable field list for international addresses might be:
- Country (drop down)
- Address
- Address 2
- City
- State
- Region/Province
- ZIP/Postal Code
I'm excluding phone, first name, last name and label any of which might also be used for a given address.
This works, but it's not as usable as it could be, so how about we display the above fields by default, but then using a little Javascript to optimize it on loading the page for users with Javascript enabled (so better usability for most users but graceful degradation for those with Javascript turned off).
Maybe start by hiding all of the fields except for the country, then depending on the country, initially if US, redisplay address, address 2 and ZIP. If other countries, display address, address 2, city, region/province and postal code (as you can easily change the label caption to either ZIP or Postal Code depending on the country). Over time you could make this a lot more sophisticated, but it seems to me this might be the basis of a fairly useful address form snippet.
Any thoughts/improvements/cautions much appreciated - I'm kinda new to all of this front end stuff . . .



Interesting. So I guess you'd just preselect country from a drop down so the user would be able to change it? I always get stuck when I'm in the UK using Starbucks as everyone thinks I'm in Germany because it goes through some Detuche Telecom IP's.
Are there any articles you'd recommend for the structure of international addresses or anything you're willing to share or is that IP you'd rather keep in-house?
Thanks for the tips!
well for resources (off the top of my head via google--i'm at home):
http://www.upu.int/post_code/en/postal_addressing_... (used to have lots of info but they seem to want money for stuff that was free in the past).
http://www.addressdoctor.com/
i suppose if there was enough interest i could open a project on riaforge & OS much of what we "know". in any case there's about 100+ countries data available most of which break down in under a dozen address structures, some of this is simply order of things--it's not rocket science ;-)
btw if you think i18n addresses are tricky, wait & see what's in store when you get to shoe & clothing sizes.
as far as "good answer", you need to have different address structures for each type of address which isn't all that hard to figure out from the available info (or what used to be available).
I thought this was an interesting post, primarily because it strikes me as such an obvious way to annoy users. It seems that many sites treat this as a necessary item and fail to think it through. The "state" field, in particular, always annoys me when it is set to mandatory. It's fine if it is only meant to service US addresses, but as you said, for international users often it is not relevant. The worst is when there is a mandatory dropdown country field but then you are required to pick a US state irrespective of your country selection... just plain silly.
ask for country
ask for country specific regional identifier or postal code
city town or other locality
ask for street
ask for internal building code like floor or apt
ask for consignee name
It is hard to change the fact that people seem to identify themselve in the opposite order.
And it does not help that mapping all those templates fields into a proper database it daunting.
anyway that's my two cents if anyones interested
How about posting a link to the information about geolocation you consider the best quick read for an executive type if I wanted them to know enough about it to give it a chance
- sourceforge uses it find the closest mirror
- abc, cbs, etc. use it to prevent me from watching free tv from thailand
- itunes, etc use it to prevent me from buying cheap music online from thailand