Topic: Form design with one field from large tree

I have a data-entry form where I want the user to be able to choose a location (among other fields like title, date, etc.) This location will come from a very large tree which starts at the continents, goes to countries, states, cities, etc. It is too large to cram into one select field.

Choosing the location should be easy enough using Ajax which will let the user move through the location tree on the data entry form. But I'd also like to support non-Javascript users if possible. I imagine in their case I will need to let them move through several pages to browse through the location tree, and then return to the main form with the value of the location that they chose.

Is there a "best way" in Rails to do something like this?

Thanks for the input.

Re: Form design with one field from large tree

I'm not sure if it's the "best" way, but I would probably detect if the state_id, city_id, etc. have been set when you attempt to save the model. If not, redisplay the view and report the error. On this view you can default the select boxes to only the states in that previously selected location. This way it's still usable for those with javascript disabled, but it's not ideal.

Railscasts - Free Ruby on Rails Screencasts