1

I am learning to use Django, and I am trying to make a registration form, but I only find how to do it the simple way, with just one step. Two questions:

1 °) How to make a form of three or more steps, where each step depends on the previous to be completed. I cannot fill part two until part one has all the fields filled.

2 °) How to use information from one step in another step? For example: In step 2, according to a field filled in in step 1, the user will be shown different information.

If you can give me at least one "way" where I should go, thank you!

Julio
  • 139
  • 1
  • 1
  • 8
  • Is this perhaps what you are looking for? https://stackoverflow.com/questions/14901680/how-to-do-a-multi-step-form-in-django – Daniel Holmes Aug 08 '19 at 08:43
  • Yes @DanielHolmes, this is what I am looking for, but it generated some doubts. If you enter for example "1" in one of the inputs of the first form, you will get a result in form 2, if you type "2" you will get another display. I couldn't see this link how to do that. And another question, is it possible to use Django Class-based to crudate this register? With CreateView, ListView, etc ... – Julio Aug 08 '19 at 09:25
  • You say "If you enter for example "1" in one of the inputs of the first form, you will get a result in form 2, if you type "2" you will get another display. I couldn't see this link how to do that." I don't quite understand what you mean by this. Perhaps try and start writing some code using session data or django-wizard and then post what you have tried and it may give a better indication of what you want to do exactly. – Daniel Holmes Aug 08 '19 at 09:39
  • Thanks, I will try to be more specific by presenting a code. And about my second question, is it possible to use Django Class-based to crudate this register? With CreateView, ListView, etc. – Julio Aug 08 '19 at 20:00
  • I think it is possible, but whether or not it is the best solution is debatable. It depends on your specific application. – Daniel Holmes Aug 10 '19 at 10:44

0 Answers0