- Posts: 16
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ // Remove the first comment box $('#question{QID} ul.ls-answers li:eq(0) .comment-item').remove(); // Insert comment suffix var suffixText = 'months'; $('#question{QID} .comment-item').append('<span class="comment-suffix">'+suffixText+'</span>'); }); </script> <style type="text/css"> #question{QID} input[type="text"] { width: auto; display: inline-block; } </style>
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ // Remove the first comment box $('#question{QID} ul.ls-answers li:eq(0) .comment-item').remove(); // Insert comment suffixes $('#question{QID} .comment-item:eq(0)').append('<span class="comment-suffix">Suffix 1</span>'); $('#question{QID} .comment-item:eq(1)').append('<span class="comment-suffix">Suffix 2</span>'); $('#question{QID} .comment-item:eq(2)').append('<span class="comment-suffix">Suffix 3</span>'); }); </script> <style type="text/css"> #question{QID} input[type="text"] { width: auto; display: inline-block; } </style>
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/I have a multiple choice question with comment, where I ask for the length of a tried treatment in months. One of the options is "no treatment tried" where the comment box, asking for the duration is redundant. I would like to get rid of that one specifically.