Friday, January 11, 2013

RE: Form validation

Hi,
You can use the wizard's get_cleaned_data_for_step(step) method where step is 0-indexed so step 2 form data would be:
get_cleaned_data_for_step('1').
It would return a dictionary of the cleaned data for that step.

Ignorable comment: I would be very pissed if I had to fill 6 form pages only to be told I can't continue because of something I did 4 pages ago.

Sent from my Windows Phone

From: Kristofer
Sent: 1/11/2013 8:00 AM
To: django-users@googlegroups.com
Subject: Form validation

Hello,

I am using FormWizard with a 12-step form.

On step 6, I want to perform verification on a field but it depends on fields that were entered in steps 2-5.

I cannot figure out how to get data from the previous steps in the form validation for step 6.

Where is a point in the FormWizard where I can access previous form data and can also raise ValidationError on a field?

Thanks,

No comments:

Post a Comment