Welcome, Guest
Username: Password: Remember me

TOPIC: Changing answer choice list based on previous answer

Changing answer choice list based on previous answer 11 months 3 weeks ago #101170

  • rvenkat
  • rvenkat's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 42
  • Thank you received: 1
  • Karma: 2
My problem is as follows:

Based on the answer participants select in Q1, which is a drop-down list, I would like to present users with different answer choices for Q1. Q2 is also a drop-down list. There are a maximum of 12 possible answer choices for Q2, but some participants may see only 2 answer choices for Q2 and others may see 10 answer choices for Q2, depending on what they selected in Q1.

For example:
Q1, Which office location did you visit?
(answer choices could be: Vancouver, Calgary, Toronto, Montreal, Halifax)

If, Vancouver was selected for Q1,
Then Q2, What service did you access?
(answer choices: s1, s2, s3, s4, s5)

If Calgary was selected for Q1,
Then Q2 answer choices could be: s4, s5, s6, s10, s11, s12

If Toronto was selected for Q1,
Then Q2 answer choices could be s3,s4,s6,s8,s9,s10,s11,s12

and so on.

I have 24 office locations and 12 services. I created a separate service list question for each of the 24 offices. Using conditions I am able to present the appropriate list in Q2. But this creates many columns in my CSV file. If s4 occurs in 10 offices, there will be different 10 columns for s4. I want only 12 columns in the CSV, one column per service.

In other words, I want a single Q2 with 12 choices, but only the appropriate choices shown based on the selection in Q1.

What is the most efficient way to do this? Any help would be greatly appreciated.
Thanks.


rvenkat
The administrator has disabled public write access.

Changing answer choice list based on previous answer 11 months 3 weeks ago #101212

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4281
  • Thank you received: 807
  • Karma: 370
Unfortunately, there is no way to filter the answers in Q2 that way (there is currently no relevance setting for answers).

Even a JavaScript solution would be quite tricky. You cannot hide <option> elements in drop-downs - you need to remove them and that would get messy if the respondent changed Q1.

P.S. You forgot Ottawa in your Q1 choices :laugh:
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
The following user(s) said Thank You: rvenkat

Changing answer choice list based on previous answer 11 months 3 weeks ago #101225

  • rvenkat
  • rvenkat's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 42
  • Thank you received: 1
  • Karma: 2
Hi Tony,

Thanks for the reply. It's too bad there's no solution.

I love our capital city. Just omitted it in the example. :)
BTW, I'm in Halifax.



Ramesh
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.102 seconds
Donation Image