Welcome to the LimeSurvey Community Forum

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

Check all that apply Multiple Choice & comment boxes ONLY FOR CERTAIN answers

  • wannah0
  • wannah0's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 10 months ago #200922 by wannah0
Hi everyone,


I would like to create a multiple-choice question where the participant can select all that apply AND have comment boxes for certain answers (not all the answers like the "Multiple Choice with Comments" option).

To demonstrate my idea I have come up with an example:

What is your usual mode of transportation? Check all that apply.
a) bus
b) car
c) train, comment box
d) bike, comment box

Please advise on how I could get the configuration as listed above. I am complete beginner to programming so I'd really appreciate any help.

Thank you!
The following user(s) said Thank You: VictoriaLawFoundation
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #200923 by holch
You probalby have to go with the muliple choice with comments question type and then hide certain comment boxes. There should be examples on how to do this in the forum.

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

The following user(s) said Thank You: wannah0
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #200925 by Joffm
Here a script you have to enter into your question text (source code mode)
Code:
<script type="text/javascript" charset="utf-8">
 
  $(document).on('ready pjax:scriptcomplete',function(){
 
    var thisQuestion = $('#question{QID}');
 
    // Remove some text inputs
    $('.checkbox-text-item:eq(0) .comment-item', thisQuestion).remove();
    $('.checkbox-text-item:eq(1) .comment-item', thisQuestion).remove();
    });
</script>

It removes the first two comment boxes.
So you see where you have to adapt if necessary.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: wannah0
The topic has been locked.
  • VictoriaLawFoundation
  • VictoriaLawFoundation's Avatar
  • Offline
  • New Member
  • New Member
More
3 years 6 months ago #205912 by VictoriaLawFoundation
Thanks Joffm, you truly are a master, it all worked for me too.
JK
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose