Re: Dynaically fields to a formwizard form

2009-08-27 Thread dingue fever
Thanks. I will check out your suggestions. On Aug 26, 6:07 am, Peter Bengtsson wrote: > You can add and modify fields on a form in the form's __init__ > function. > > class MyForm(forms.Form): >     country = forms.ChoiceField() >     def __init__(self, *args, **kwargs): >    

Re: Dynaically fields to a formwizard form

2009-08-25 Thread Peter Bengtsson
You can add and modify fields on a form in the form's __init__ function. class MyForm(forms.Form): country = forms.ChoiceField() def __init__(self, *args, **kwargs): super(MyForm, self).__init__(*args, **kwargs) self.fields['country'].choices = \ [(c.iso_code,

Dynaically fields to a formwizard form

2009-08-25 Thread dingue fever
Hi, Is it possible to dynamically add fields to a formwizard form. I have been able to add the fields I want but if the form fails validation the new dynamic fields disappear when the form re-renders. Is it possible to override this so that I can validate and return the new fields if the