Welcome to the LimeSurvey Community Forum

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

Hide comment box of multiple choice with comments without javascript

  • Arwin20
  • Arwin20's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 6 months ago #227830 by Arwin20
Please help us help you and fill where relevant:
Your LimeSurvey version: LimeSurvey Cloud Version 3.28.7
Own server or LimeSurvey hosting: hosting
Survey theme/template: custom 
==================
Hi everyone, 

I'm new to limesurvey and have the following issue. I want to add the following question to my survey: 

Do you collaborate with other partys in the field of drug prevention? 

With the following answer options: 
Yes I always work with different partys, namely... (Comment box)
Yes I sometimes work with different partys namely... (Comment box)

Yes, I collabarate with other partys in different fields namely... (Comment box)
No, I do not (No comment box)
I don't know (No comment box) 


I found several solutions to add a comment box to some answers and hide it in other answers, but this is all with Javascript. For some reason, our work server blocks all traffic whenever we try to add a script. So, I was wondering, is there a solution to hide comment boxes in certain answers without Javascript? Or do you guys have another solution?

Thanks in advance,
Arwin 
 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 6 months ago #227832 by Joffm
Without javascript???
In my opinion you have to split the question

Display the comments below the question with relevance equation

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 6 months ago #227852 by tpartner
If you can add CSS, this should work in the question text:

Code:
<style type="text/css" data-author="Tony Partner">
 
  #question{QID} .checkbox-text-item:nth-child(4) .text-item,
  #question{QID} .checkbox-text-item:nth-child(5) .text-item  {
    display: none;
  }
</style>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: Joffm

Please Log in to join the conversation.

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
7 months 6 days ago #260328 by Mazi

I want to add the following question to my survey: 

Do you collaborate with other partys in the field of drug prevention? 

With the following answer options: 
Yes I always work with different partys, namely... (Comment box)
Yes I sometimes work with different partys namely... (Comment box)

Yes, I collabarate with other partys in different fields namely... (Comment box)
No, I do not (No comment box)
I don't know (No comment box) 

 
This can be done easily with the following plugin which allows to define which options should not have a comment box shown:  survey-consulting.com/product/multi-opti...e-limesurvey-plugin/
Demo:  plugins.mysurveyhosting.com/index.php/344631?newtest=Y&lang=en

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose