Best way to create a form wizard

61 views
Skip to first unread message

Francesco

unread,
Apr 18, 2020, 1:23:31 PM4/18/20
to Django users
Hi all,

I am working on a form on Django. I would like to create several sections of the form, just to let the users insert data in steps.
I would like also to change the questions based on the previous answers of the users (for example, if in the first page you tell me you are a male, in the second step I would ask you you favourite sport, while if you answer that you are a female, I would ask your favourite color).

I would like to have an advice on how to start, and in particular:
  1. Is the "form tools" (https://django-formtools.readthedocs.io/en/latest/#) the only way to do this? There is a good tutorial/book, possibly with a working example? (I am pretty new with Python and Django, and I need good resource)
  2. Do I have to creare a single model with all data, or can I manage a model for each page?
Thank you very much!

Francesco
Reply all
Reply to author
Forward
0 new messages