Welcome to the LimeSurvey Community Forum

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

subquestion relevance controlled by a drop-down?

  • LeftyMaus
  • LeftyMaus's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 2 months ago - 8 years 2 months ago #129644 by LeftyMaus
I have essentially three questions for a hypothetical Child Care provider, that I would like to add to an existing survey. They are:
  1. Have you ever closed a classroom?
  2. If so, how many have you closed?
  3. Could you please provide additional details on your closed classrooms
I would like to set up the logic so the user is not unnecessarily bothered with detail questions if closed classrooms does not apply to them.

I know how to set up a similar stream of questioning using the array filter feature, with a Yes/No as No. 1, a Multiple short text as No. 2, and finally an Array (Numbers) for No. 3. I have also found multiple examples of sub-question relevance using .multiple-opt , and .ranking . However, I cannot seem to find any examples of a drop-down being used to hide/reveal a series of sub-questions.

The closest I've been able to come is to use javascript onload feature to hide certain sub-questions, but that only works when the user clicks to the next page of the survey. Unfortunately I'm limited to keeping all the questions under one group. I've tried to adapt the theory, but no luck. It seems crazy to me that this has not already been explored, and I would be happy to adapt someone else's solution, but I just can't find it.

I've attached a development copy of my survey, and each group represents a different tactic, all of which have fallen short. Group 3 gets it really close, but the filter array appears to be all or nothing and I can't get it to hide/reveal selected sub-questions. I've been on this issue for days now, and I think its time to ask for help from the experts.

Can this be done?

[EDIT1: added file]
Last edit: 8 years 2 months ago by LeftyMaus.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 2 months ago - 8 years 2 months ago #129650 by tpartner
In LimeSurvey 2.06 you can place relevance on array subquestions.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 8 years 2 months ago by tpartner.
The topic has been locked.
  • LeftyMaus
  • LeftyMaus's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 2 months ago #129674 by LeftyMaus
Replied by LeftyMaus on topic subquestion relevance controlled by a drop-down?
Thanks. I've currently got 2.05+, and I've got an ask to see if my provider can offer 2.06 instead. Would you recommend against upgrading for any particular reason? The reason why I ask is in case 2.06 has any instability issues that you know of.

I've spent a lot of time on this issue and we have a work-around in place, so its not exactly mission critical at this point. I would really hate however if this morphed into a bigger installation/upgrade/compatibility headache.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 2 months ago #129677 by tpartner
Well, 2.06 is the latest stable version. Having said that, I feel there is always some risk in upgrading during a production survey (that is my personal opinion, not necessarily the LS team's). So, if you have a viable workaround, upgrading may not be for you.

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
8 years 1 month ago #131209 by hvgard
Hi Tony, I have the same problem: I want to filter Lists (dropdown in this case) using relevance. It seems to be there for arrays as I can edit the RE per answer in 2.06, but not for lists. I have no idea why.

Harold van Garderen
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 1 month ago #131210 by holch
Relevance only exists for subquestions, not for answer options. In your list dropdown the items are "answer options" while in an array they are "subquestions" and the horizontal label set are the "answer options". Would be great to have relevance equation also for 'answer options', but this is not the case at the moment.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: tpartner, hvgard
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 1 month ago - 8 years 1 month ago #131244 by DenisChenu
Replied by DenisChenu on topic subquestion relevance controlled by a drop-down?
Alternative for relevance for answers is
- Add an hidden equation
- Add a hidden multi choice qith same code than "Lists"
- Use the equation to SET (use =) subqiuestion answer to needed option
- Use array_filter in answers.

I must do a simple lss files , but no time actually.
The multi question must be before List (different page)

PS: i really think we never filter dropdown in javascript.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 8 years 1 month ago by DenisChenu.
The topic has been locked.
  • LeftyMaus
  • LeftyMaus's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
7 years 3 months ago - 7 years 3 months ago #146101 by LeftyMaus
Replied by LeftyMaus on topic subquestion relevance controlled by a drop-down?
I can confirm that while running Version 2.56.1, I can control subquestion relevance. I've set it up to reveal up to four subquestions depending on the answer of a previous drop-down list. For example, choosing "two classrooms closed" will display two records on the array of texts.

See attached "array of texts relevance.png" to see where the Relevance Equation is actually added.
Last edit: 7 years 3 months ago by LeftyMaus. Reason: Last sentence modified for clarity
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose