Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

subquestion conditioned by previous subquestion

More
9 years 10 months ago #109691 by bio
Hi there,

I have two multiple choice questions, say Q1 and Q2, with the relative choices, say SQ1.1 - SQ1.N, SQ2.1 - SQ2.N; my issue is that I'd like SQ2.X choice to be displayed only if some of the SQ1.X is ticked, but I can't find the way to implement this.

Any help?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 10 months ago #109697 by tpartner

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
9 years 10 months ago #109701 by bio

tpartner wrote: See "Array Filter" - manual.limesurvey.org/Question_type_-_Mu...r_.28array_filter.29 .


Where it is stated that: "Array filter question settings require the questions being used to have exactly matching lists of answers. If the questions do not have exactly the same set of answers and codes, then the filters will break. Starting in 1.92, if Q2 has sub-questions that are not present in Q1, they will always be displayed rather than breaking the filters."

Which exclude my issue, since there is no matching between SQ1.X and SQ2.X in my case.

I try to explain myself a little better.

Suppose I have:
Q1: which color do you like?
SQ1.1 = red
SQ1.2 = yellow

Q2: which fruit do you like?
SQ2.1 = apple
SQ2.2 = orange
SQ2.3 = banana
SQ2.4 = pineapple

If you tick 'red' in Q1, then I want only apple and orange to be displayed, while if you tick 'yellow' in Q1 I want apple, banana and pineapple to be shown in Q2.

Am I missin g something about array filtering?

Thank you for the answer!
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 10 months ago #109734 by tpartner
There is no built-in method to filter multiple subquestions at at time. If both questions are on the same page you could use JavaScript to filter but it may be easier to simply use several versions of Q2 shown by relevance or conditions.


.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
9 years 10 months ago #109738 by bio
That was my fear :(

Thanks anyway!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose