Django formWizard add second step by ajax

463 views Asked by At

I got a problem with handling dynamically changing multiple forms in one step, so I thought that it might be possible to load second form as next step by ajax (i don't know if formWizard will let me dynamically change second step depending on previous choices). I have been using formContainer : https://code.djangoproject.com/attachment/ticket/18830/form_container.py

but it is a little troublemaker in handling data. So can you advice me if ajax is a solution in this situation?

1

There are 1 answers

0
Rohan On

Yes, with the form wizard you can skip/add the step depending upon data chosen in previous steps or some other criteria.

You need to pass condition_dict to the wizard view, which can contain callables to be called to determine specific steps should be shown/skipped.

The page has good example too.