Filling out forms isn't high on most people's lists of fun things to do, even on a rainy afternoon. And web-based forms are less fun than most, despite their being electronic and theoretically amenable to all sorts of nifty automation.
The general lameness of web browsers as a user interface aside, my own irritation meter hits the red zone almost any time I'm called on to enter my address details. I live and work in Australia but many of my commercial dealings on-line are with firms outside the Lucky Country. This often makes filling in the address forms presented by these firms an adventure and occasionally makes it impossible.
Just kvetching about these forms, however, doesn't improve my on-line experience, although it does satisfy other, less noble, regions of the soul. So, in a vague imitation of the spirit of sharing (and in honour of the deadline I almost missed because this little project was more interesting, if not better paying) I offer the following basic form:
Billing & Shipping Address
This first go at a multi-country friendly address entry form is deliberately biased towards residents of the English-speaking world. I've assumed an English-language form will be used primarily by English-speaking folk.
Adapting this form for use in other languages isn't difficult, however. On a Portugese-language site, for example, the country radio buttons and state pop-up menus would be switched to refer to Portugal and Brazil with those of us coming from elsewhere still able to fill out the form thanks to the 'Other' text-entry fields. Similarly with a Spanish-language site, where the radio buttons and pop-up menus should provide push-button convenience to folk in Mexico, Spain, Argentina and so on.
The goal is to make things as easy as possible for the majority of those filling out the form without unnecessarily inconveniencing visitors or customers coming from unexpected quarters.
If this form looks like something you'd be interested in using or at least twiddling with, please feel free. You can grab a copy using the Show Source or equivalent command in your browser or download just the form as either a StuffIt or PKZip archive. The StuffIt archive contains a BBEdit text file called form.html complete with Mac OS line endings (ie CR) and ready for use on a Mac OS box. The PKZip archive contains a generic text file called form.htm complete with DOS line endings (ie LF/CR), equally useable on a Mac OS box but better suited to folks using a PC.
Just in case it's not obvious, the above form isn't hooked into any back-end process. You can fill it in to your heart's content but it can't pass the data entered on to anything. The form also doesn't include much in the way of error-checking. It has a few front-end features which should make it relatively easy for any CGI to check for user errors but anyone wanting client-side error checking will need to re-write the form using ECMAScript or some such.
Also, before anyone asks, yes Great Britian has counties and South Africa has provinces, each of which are broadly equivalent to the states and provinces of Oz, the US and Canada. They aren't used as part of postal addresses, however. New Zealand, so far as I am aware, doesn't have administrative regions between the local (ie town and city) and national levels. For more information on address layouts used in various parts of the world the International Address Formats site maintained by the folks at BitBoost is an excellent starting point.