Welcome to the LimeSurvey Community Forum

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

Multiple response other that can be ticked

  • tixeon
  • tixeon's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
4 years 6 days ago #208236 by tixeon
I recently discovered that people are dropping out of my surveys because they can't tick other in multiple response questions (see here: forums.limesurvey.org/forum/can-i-do-thi...x-not-ticking#208099 )

I contacted support and they said this is just how the system works ( bugs.limesurvey.org/view.php?id=16157 ).

Therefore, I need to come up with a work-around moving forward to reduce drop-outs and increase accuracy of responses (people can choose other without having to type something in).

My thinking is to:
  • Include the other specify in the multiple response subquesiton list
  • Create a short free text question after it that triggers if they click other
  • Move the short free text question so it appears after the 'other' subquestion



The complication lies in the fact that other is seldom at the end of the list (usually there is a don't know or none after it - it needs to be this way as this is correct answer option flow).

Incidentally, I also have code in the question text that locks the other and don't know to the end of the list when randomised.

File Attachment:

File Name: Other spec...ound.lss
File Size:23 KB


This will have the added benefit in that I won't have to write syntax in SPSS to generate a variable for other for when I run multiple response tables!

Does anyone have ideas on how this can be done?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 5 days ago #208267 by tpartner
Replied by tpartner on topic Multiple response other that can be ticked
1) Add this script to the question source:

Code:
<script type="text/javascript" charset="utf-8">  
  $(document).on('ready pjax:scriptcomplete',function(){
 
    // The "Other" sub-question code
    var otherCode = '6';
 
    // Identify this question
    var qID = '{QID}';
    var thisQuestion = $('#question'+qID);
    var nextQuestion = $(thisQuestion).nextAll('.text-short:eq(0)');
 
    // Move the next question
    $('.answer-item[id$="X'+qID+otherCode+'"]', thisQuestion).append(nextQuestion);
    });
</script>

2) Add something like these styles to the question source:

Code:
<style type="text/css">
 
  .answer-item .question-container {
    margin: 0 0 0 -20px;
    border: 0 none;
    background: transparent;
  }
 
  .answer-item .question-title-container,
  .answer-item .question-valid-container {
    display: none;
  }
 
  .answer-item .answer-container,
  .answer-item .answer-item {
    padding: 0;
  }
</style>



Sample survey attached:

File Attachment:

File Name: limesurvey...5694.lss
File Size:22 KB

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: tixeon
The topic has been locked.
  • tixeon
  • tixeon's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
4 years 5 days ago #208273 by tixeon
Replied by tixeon on topic Multiple response other that can be ticked
This is fantastic. This code is going to save me from respondent drop-outs and additional work in analysis, thank you so much. So elegant and easy to use!
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose