- Posts: 3
- Thank you received: 0
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
- Babba
- Topic Author
- Offline
- New Member
Less
More
7 years 2 months ago #148699
by Babba
"Multiple options" question with several primary and secundary options was created 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
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11655
- Thank you received: 2742
7 years 2 months ago #148700
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic "Multiple options" question with several primary and secundary options
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.
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.
- Babba
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
7 years 2 months ago #148705
by Babba
Replied by Babba on topic "Multiple options" question with several primary and secundary options
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?
Is there anything else I need to take care of for it to function?
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11655
- Thank you received: 2742
7 years 2 months ago #148706
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic "Multiple options" question with several primary and secundary options
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.
- Babba
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
7 years 2 months ago #148710
by Babba
Replied by Babba on topic "Multiple options" question with several primary and secundary options
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:
And this is the Java template I used. At the very end there is the part for the secondary checkbox:
Attachments:
The topic has been locked.