A client wants a web form that uses a drop down for the users country and another drop down that automatically list ALL states/provinces within the selected country. I can implement the logic of the form; that is not the problem. The problem is the massive data that would be involved and possible complications that could arise from such a setup. I have already informed the client that the requirement is a dumb idea, not cost effective, and that it would require a database because there can be thousands of provinces worldwide.
Is the request advisable or good practice?
Are there any examples of this form setup online?
Are there any api’s or web services that can accomplish this?
Any feedback would be greatly appreciated
We had to deal with similar setup in our website. After much discussion, we settled on a subset of this: the states/provinces are only populated for a small number of countries (about 10, I think) and for all other countries a simple text box is displayed to enter the county/state/province.
The data is stored in the database and is loaded with the page in the beginning and javascript is then formatted from the php. The site is http://www.ooklnet.com – click on “join” in the top right corner, then select “individual”. Try changing the country to USA, Canada, United Kingdom, Mexico, India (or a few other ones).