Welcome, Guest
Username: Password: Remember me

TOPIC: Limiting additional questions according to a multiple choice list

Limiting additional questions according to a multiple choice list 3 years 6 months ago #58162

  • holch
  • holch's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 2716
  • Thank you received: 331
  • Karma: 121
I think the following scenario that I am describing is pretty common in market research and I am wondering if this is possible with Limesurvey.

Let's say we are asking people about certain medical conditions they have or had in their live.

So we might have a pretty long list of different diseases/conditions. The participants are asked which of these they already had or currently have. For each diseas/condition there are a few additional questions. Depending on the participant, the list of diseases can be quite long and the survey would get ridiculously long if we ask them additional questions for all diseases they had.

So let's say we want to limit it do the additional questions for more maximum 5 diseases. But, of course we would like to give a preference to some diseases in this case, let's say the rarest ones, so they that we don't lose any responses for those diseases where it is difficult to find a person anyway.

I was thinking of this: I create the list of diseases, they can be randomized. Then, in a second step I create the question groups for the additional questions for each disease. To take care of the preference, I would put the ones that I would like to give preference first, so that they are answered first, in case the disease was chosen in the first question (otherwise they would be hidden via conditions). I think this would solve the preference problem the easiest way. What do you think?

Now, when it comes to the limit of maximum of 5 questions, I am a little lost.

I was thinking of a counter. I add to each disease question group a hidden question where I add a number. If it is the first question, I add 1, then I would have to get this one somehow to the hidden question of the second group and increase by one until I reach 5. However, in theory this sounds quite easy, but I am not sure how to implement this. Additionally, how do I make sure that the other questions are not shown then? Condition for each "hide if count > 5" or something? How would I pass the figure on to the next group that is shown and pass by the ones that are hidden by condition (because they were not marked?

And then, does anyone have another idea on the preference thing?

I hope I explained my case well. If not, please let me know and I try to explain it differently.
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
The administrator has disabled public write access.

Re: Limiting additional questions according to a multiple choice list 3 years 6 months ago #58170

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4207
  • Thank you received: 791
  • Karma: 360
Hi Holch,

How about this idea that I think should take care of both requirements - limiting the number of follow-up groups (ailment-specific questions) and which of those groups are displayed by preference.

1) Create your multiple-options question for the ailments (let's call it Q1) - you can randomize if you like.

2) In the same group (on the same page), create a copy of Q1 with identical answers and codes (let's call it qHidden). List the answers in order of ailment preference.

3) Create all of your follow-up groups in order of ailment preference.

4) Make all follow-up groups conditional on qHidden.

5) Add a script to qhidden that does the following:
- hides qHidden
- interrupts the next/submit function and:
- checks the same options in qhidden as were checked in Q1
- unchecks all but the first 5 options in qHidden
- continues with the the next/submit function

This should end up displaying only 5 follow-up groups in order of preference.

Let me know if this fits your needs and I'll put together an example of the script to use.
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.
Last Edit: 3 years 6 months ago by tpartner.
The administrator has disabled public write access.

Re: Limiting additional questions according to a multiple choice list 3 years 6 months ago #58185

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
This sounds like a really great solution, tpartner.

Since holch states that this is a widely used feature at market research we should also add another example at the workarounds for this. Maybe we can also upload a sample survey there?

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: Limiting additional questions according to a multiple choice list 3 years 6 months ago #58382

  • holch
  • holch's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 2716
  • Thank you received: 331
  • Karma: 121
Hi all!

First of all, sorry for not getting back. This is really bad style. But I posted this and then got really busy with several projects, didn't know where my head was any more... ;-)

Thank you very much for this. Looking at it quickly, this might be what I was looking for. I'll give it a try once I am back from my business trip and have some time off and give some more feedback.

Sorry for not getting back earlier. I know how it is when you post a response in a forum and don't get ANY feedback.
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
The administrator has disabled public write access.

Re: Limiting additional questions according to a multiple choice list 3 years 6 months ago #58385

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4207
  • Thank you received: 791
  • Karma: 360
Don't stress it Holch - no worries.

Let me know if you want help with the script.

Your punishment will be to write up the workaround if it works :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.
Last Edit: 3 years 6 months ago by tpartner.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.133 seconds
Donation Image