You'll have to use Javascript to change a dropdown list based on
another dropdown list. Consult a Javascript reference for this.
You'll have to create an action in your application to return a list
of states. For instance, if the Javascript notices that the country
has been set to US, it might request /ajax/states/US, and the action
might return a JSON list of (state_id, state_name) pairs, which the
Javascript would put into the droptown.
However, Pylons' @jasonify raises a warning when converting a list,
citing this possible attack:
http://wiki.pylonshq.com/display/pylonsfaq/Warnings
I'm not sure what's best in this case. You could ignore the warning,
or return a text file containing one state per line (with the first
word in the line being the ID).
(Attention Ben: the URL in the warning is out of date.)
--
Mike Orr <slugg...@gmail.com>
--
Paweł Stradomski