I\'m using the FormWizard functionality in Django 1.4.3.
I have successfully created a 4-step form. In the first 3 steps of the form it correctly takes information f
Try this:
def get_context_data(self, form, **kwargs):
previous_data = {}
current_step = self.steps.current # 0 for first form, 1 for the second form..
if current_step == '3': # assuming no step is skipped, this will be the last form
for count in range(3):
previous_data[unicode(count)] = self.get_cleaned_data_for_step(unicode(count))
context = super(my4StepWizard, self).get_context_data(form=form, **kwargs)
context.update({'previous_cleaned_data':previous_data})
return context
previous_data
is a dictionary and its keys are the steps for the wizard (0 indexed). The item for each key is the cleaned_data
for the form in the step which is the same as the key.