Check out the LimeSurvey source code on GitHub!

Limiting additional questions according to a multiple choice list

More
5 years 11 months ago #58162 by holch
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.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
5 years 11 months ago - 5 years 11 months ago #58170 by tpartner
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.
Last Edit: 5 years 11 months ago by tpartner.

Please Log in to join the conversation.

More
5 years 11 months ago #58185 by Mazi
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)survey-consulting.com'"

Please Log in to join the conversation.

More
5 years 11 months ago #58382 by holch
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.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
5 years 11 months ago - 5 years 11 months ago #58385 by tpartner
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.
Last Edit: 5 years 11 months ago by tpartner.

Please Log in to join the conversation.

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