I am trying to build a multi-step forms from one Django model which have 9 fields. The forms are validated in each step and saved after final step into database.
The quick solution I can think of beside Django formWizard is
I have a django model like this:
class Question(models.Model):
name = models.CharField(max_length=100)
Description = models.TextField()
filter = models.CharField(max_length=20)
I split the form into three
class Filter(forms.ModelForm):
class Meta:
model = Question
exclude = ('filter',)
class Name(forms.ModelForm):
class Meta:
model = Question
fields = ('name',)
class Descripton(forms.ModelForm):
class Meta:
model = Question
fields = ('description',)
Write urls
and integrate with views
for different steps. The question is how can I validate and save multi-steps forms data at last step?
What is your use case for splitting this up into three steps rather than in a single one?
That aside, a simple solution would be to: