Search code examples
djangoformspostbackinordermulti-step

interesting multistep forms in django


I have a multi-step form but it is a little different from commons. The difference is not all steps are consecutive and forms may be inorder. To be clear, let say there are Form1 , Form2 , Form3 and Form4.

Those may run like Form1 - Form2 - Form3 or Form1 - Form2 - Form4. However, there is no chance like Form2 - Form1 (Form_x - form_y | x < y)

How can I implement such form chains in django ? Also, I couldn't understand how FormWizard works. Does it produce back button automatically or how does it behave when user turns to previous form ? Could explain or give simple example or refernce ?

Thanks


Solution

  • FormWizard will not provide back nor submit buttons, this is up to your template.

    FormWizard is just a fancy view that will handle the template rendering and pass the data around forms until completion.