Hi Malcolm and others,

my first to create a child form failed, because motherform.cleaned_data does
not exist, if a validation error occurred. Now I populate the childform 
during
motherform.clean() and it works.

Thank you very much for all your great work Malcolm!

  Thomas

Malcolm Tredinnick schrieb:
> On Wed, 2008-06-25 at 09:27 +0200, Thomas Guettler wrote:
>   
>> Hi,
>>
>> depending on the values from form.cleaned_data, I want to present different
>> input fields to the user. Example:
>>   The user chooses a country, and after submit (no ajax), the
>>   cities of this country should be in a drop down box.
>>
>> Since my setup is more complex, I don't want to use the uncleaned 
>> request.POST or form.data.
>>
>> I guess I need to create two forms ..
>>     
>
> I'd do it with separate form classes, where the second form's fields are
> dynamically populated based on the first form's cleaned_data. It feels a
> bit fragile (and tricky to understand in six month's time) to be
> changing the current form's fields after data has been applied to it.
>
> Malcolm
>
>
>
> >
>   


-- 
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to