On Sun, Oct 16, 2016 at 7:37 PM, Diego De La Vega <aiwilfa...@gmail.com>
wrote:

> Hi. This is my first question in this group.
>
> My problem is that I have to program a survey application and I would like
> to have a hint about forms.
>
> The survey is +200 questions long and is divided in multiple subjects
> (every subject is independent from the others) and mainly consists of
> numeric (implemented as combo boxes) and text fields..
>
> The main problem is how to do for showing the relevant fields and not the
> unwanted.
>
> Let me explan this: suppose that when the answer to question 1 is 1, the
> survey continues with question 2, but if the answer is 2, then the survey
> continues with question 16 and all the in between questions are skipped.
>
> This is a very simple scenario, but almost all the flow of the survey goes
> like this, making it complex to follow the order. Sometimes one must skip a
> few questions but some others, one must skip only one, or a full section of
> the questions, depending on the answer.
>
> Is there a recommended way to do so? Thanks in advance and sorry for my
> English, I'm not a native English speaker (I hope all this mess can be
> understood).
>

Django FormTools may be another option, specifically the FormWizard:
https://django-formtools.readthedocs.io/en/latest/wizard.html

However, unless you have a very simple and deterministic way to figure out
the next question, it will likely turn in to a coding nightmare. The step
skipping has a bit of a learning curve to it. The FormWizard was likely
built with shorter and more linear workflows in mind.

Note that this package was included in Django core up until 1.7, this
package is (literally) the same thing, just broken out into a separate
package (most users did not use this functionality and it bloated the code
base if I remember the comments in the release notes).

While this can be super robust, it will probably not be easy.

-James

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciW0im95y84d7dO93wXiOqpCTMAL0Ju3BRLK4ndyoG8yeA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to