i have 2 day’s thinking how make this.
I have two forms (really 4), the first form have radio buttons, where the second form will be different if the user choice x radio button option.
Like alway’s sorry with my English.
ill explain :
First Form have an options with radio buttons, with the options ill bring the “called form”, i have 3 form’s waiting for.
I was reading about WizardForm, but i don’t know how bring the second form in dynamic way.
Please a need some help with this 🙁
Thanks
It will probably help if you read the
contrib/formtools/wizard.pycode. It’s fairly straightforward and following it will give you a better sense of what you need to do.There is a
process_stephook in there which you’ll need to override in your own form wizard. What I did is look at what step I was at do some special processing if the form validated (ie, it hadcleaned_data):If I understand your question correctly, you want the 2nd step to serve a particular form based on the user’s choice from the 1st form. In that case, what I might try first is to build a dynamic generic form for the 2nd step, where the fields used are based on the results from the first form (untested):
Then, in your 2nd form