Usually this would be done with a javascript function. You could display the form but have the city field disabled until a state was chosen and then (probably with an async call) populate the city field with a list of relevant cities.
To just use server side validation for this you would have to use two synchronous requests (and perhaps two forms), one to get a form for the state and one to get a form for the city, this would assume that there is a relationship in your models where you could do something like: City.objects.filter(state__exact = state) for the queryset of the city model choice widget. -richard On 5/30/08, mimito <[EMAIL PROTECTED]> wrote: > > > I have a form that has two fields (ModelChoiceField) > > 1. State > 2. City > > City and State from Spain. > > How do to display only the cities of the state selected? > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---