Check out the LimeSurvey source code on GitHub!

condition for next question

More
6 years 1 month ago #54798 by chupanibre
Hi limesurvey experts

I want to set the following condition: Question A has 4 possible answers, Question B should only be displayed when the subject choses options 2, 3 or 4, but not if he choses option 1. I would like question B to appear under question A if the subjects checks one of the right answers, not before and not on a different page... Is this possible?

Thanks!
Chupa

Please Log in to join the conversation.

More
6 years 1 month ago #54801 by tpartner
You can use scenarios to achieve ORed conditions.

You would end up with something like:


Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:

Please Log in to join the conversation.

More
6 years 1 month ago #54804 by chupanibre
thank you for your help!

I tried to implement this, unfortunately there is still the problem that the conditions can only be combined using the logical operator "or", since both conditions come from the same tested value. This means that I end up creating conditions where one of the 2 elements is always true and therefore question nbr. 2 is displayed....

Is there any way to work around this?

Please Log in to join the conversation.

More
6 years 1 month ago #54807 by tpartner
I'm afraid I don't understand. The above conditions will show q2 only if:

(q1-2 OR q1-3 OR q1-4) == checked AND q1-1 == unchecked

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
6 years 1 month ago - 6 years 1 month ago #54809 by chupanibre
As you can see below, my condition is : (q1-2 OR q1-3 OR q1-4) == checked OR q1-1 == unchecked




edit: it is the german version, "oder" means "or"
Attachments:
Last Edit: 6 years 1 month ago by chupanibre.

Please Log in to join the conversation.

More
6 years 1 month ago - 6 years 1 month ago #54812 by tpartner
Attach a sample survey with the 2 questions and I'll test it.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 6 years 1 month ago by tpartner.

Please Log in to join the conversation.

More
6 years 1 month ago #54823 by Mazi
You have to add 2 conditions to this question, the first one shiuld read
"show q2 only if:
(q1-2 OR q1-3 OR q1-4)"

...and the second one should deal with "AND q1-1 == unchecked"

Do NOT use scenarios for the last condition.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
6 years 1 month ago #54832 by chupanibre
I understand what you mean, the problem is that I cannot define any "AND" conditions.
I have 2 questions, both are arrays with 4 options. I want to hide question 2 and make it appear if the subject selects options 1,2 or 3 in question 1. I tried to combine the conditions as you advised me to, which leads to the same result: both questions are displayed simultaneously, question 2 disappears if options 1,2 or 3 are checked....

@Mazi: I tried to implement your suggestion, but I was not able to add the second condition "AND q1-1 == unchecked" without making it a scenario and without the "or" attribute.

@tpartner: I exported the survey in question and attached it (I take it this was what you meant by asking for a sample survey?)

File Attachment:

File Name: limesurvey...8284.lss
File Size:28 KB
Attachments:

Please Log in to join the conversation.

More
6 years 1 month ago #54840 by Mazi
Maybe we really ran into some limitation here. I'll try to ping our condition expert.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"
The following user(s) said Thank You: chupanibre

Please Log in to join the conversation.

More
6 years 1 month ago #54849 by chupanibre
Thanks!

Wouldn´t it be possible to do this using java-script?

Please Log in to join the conversation.

More
6 years 1 month ago - 6 years 1 month ago #54852 by tpartner
But, since the Q1 array uses radio buttons, wouldn't this work:

It will initially only display Q1. If Q1-2(manchmal), Q1-3(oft) or Q1-4(fast immer) are selected, Q2 appears. If Q1-1(nie) is selected, Q2 disappears.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
Last Edit: 6 years 1 month ago by tpartner.
The following user(s) said Thank You: chupanibre

Please Log in to join the conversation.

More
6 years 1 month ago #54853 by chupanibre
:ohmy:

This is brilliant. I simply was not able to see the obvious...

Thanks a lot!

Please Log in to join the conversation.

More
6 years 1 month ago #54856 by tpartner
Hehe, the forest for the trees.

You're welcome.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form