Welcome to the LimeSurvey Community Forum

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

"Multiple options" question with several primary and secundary options

More
7 years 2 months ago #148699 by Babba
Hi everybody,
I am trying to use the workaround for "Multiple options" question with several primary and secundary options:

However I dont really understand what I have to do in this step:
"Call the function in the source of the question with the question ID (no editing necessary), the start position of the primary sub-question and the number of secondaries to follow. So, in this example, sub-question 1 is a primary followed by 2 secondaries and subquestion 6 is a primary followed by 3 secondaries.

<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
// Sub-question 1 is primary followed by 2 secondaries
secondaryCheckboxes({QID}, 1, 2);
// Sub-question 6 is primary followed by 3 secondaries
secondaryCheckboxes({QID}, 6, 3);
});
</script>

Where excatly do I need to paste this code? And how do I indicated which question in my survey actually is the one with secondary options?

Help is very much appiciated
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 2 months ago #148700 by holch
Usually you need to put this into your question text. From there the {QID} part will be substituted automatically by the actual question id.

However, I am not sure if this works if there is more than one question on the same page. You'll need to test that yourself.

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

The topic has been locked.
More
7 years 2 months ago #148705 by Babba
I tried that, but it doesnt work, so I tought I misunderstood. But apparently not.
Is there anything else I need to take care of for it to function?
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 2 months ago #148706 by holch
Can you post a link to where you have the script from and a .lss file?

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

The topic has been locked.
More
7 years 2 months ago #148710 by Babba
This is where I got the script manual.limesurvey.org/Workarounds:_Manip..._options.22_question

And this is the Java template I used. At the very end there is the part for the secondary checkbox:
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose