Problem in forms with output when using conditionals
Hi folks,
I have a problem in forms with the output when using conditionals. For example:
Question 1, single choice: A or B
Choose A, you get another single choice question 2: choose C / D / E
Choose B, you get question 3: choose F / G / H
Someone chooses question 1:A, and then 2:C. But before submitting the form, he goes back to question 1, chooses B, and then 3:G.
Then the output should only show:
Question 1:B
Question 2:
Question 3:G
But instead it shows:
Question 1:B
Question 2:C
Question 3:G
Which is very confusing. And a problem, since (in this example) 2:C and 3:G are mutually exclusive. Only the options that are selected when submitting, should be submitted. Is there any way to correct this?
Any ideas? Maybe a way to clear all fields that don't match their conditions, when submitting?
Correction:
I found that what I wrote above is not the whole story. The problem doesn't happen with single choice questions. Only with text-fields that are triggered by single choice questions.
So: Question 1:A triggers question 2( text field): I enter 'D'.
Before submitting the form, I go back to Question 1, choose B. That triggers question 3. I choose or enter F.
I solved this in part, that is, in the confirmation mail (but not in the database). In the e-mail I used if-statements to only show the result of question 2, if the condition was met. If Question 1 had A as answer.
Problem in forms with output when using conditionals
Hi folks,
I have a problem in forms with the output when using conditionals. For example:
Question 1, single choice: A or B
Choose A, you get another single choice question 2: choose C / D / E Choose B, you get question 3: choose F / G / H
Someone chooses question 1:A, and then 2:C. But before submitting the form, he goes back to question 1, chooses B, and then 3:G.
Then the output should only show: Question 1:B Question 2: Question 3:G
But instead it shows: Question 1:B Question 2:C Question 3:G
Which is very confusing. And a problem, since (in this example) 2:C and 3:G are mutually exclusive. Only the options that are selected when submitting, should be submitted. Is there any way to correct this?
Best, Jeroen
Any ideas? Maybe a way to clear all fields that don't match their conditions, when submitting?
Correction: I found that what I wrote above is not the whole story. The problem doesn't happen with single choice questions. Only with text-fields that are triggered by single choice questions.
So: Question 1:A triggers question 2( text field): I enter 'D'. Before submitting the form, I go back to Question 1, choose B. That triggers question 3. I choose or enter F.
The results show: 1: B 2: D 3: F
But it should show: 1: B 2: 3: F
Thanks for any suggestions.
Jeroen
I solved this in part, that is, in the confirmation mail (but not in the database). In the e-mail I used if-statements to only show the result of question 2, if the condition was met. If Question 1 had A as answer.
is working on a reply...