- Posts: 85
- Thank you received: 9
Ask the community, share ideas, and connect with other LimeSurvey users!
tpartner wrote: Can you please explain exactly what you are trying to accomplish with a mock-up, give your LimeSurvey version and attach a small sample survey (.lss file).
marcgold wrote: What I did notice is that the hyperlink on the label still activates the checkbox.
Can you explain how you managed to move the label as the code above doesn't seem to work in custom.css.
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ $('#question{QID} .answers-list li:eq(1)').addClass('hidden-checkbox'); $('#question{QID} .answers-list li:eq(7)').addClass('hidden-checkbox'); $('#question{QID} .answers-list li:eq(19)').addClass('hidden-checkbox'); $('#question{QID} .answers-list li:eq(23)').addClass('hidden-checkbox'); $('#question{QID} .hidden-checkbox input').remove(); }); </script> <style type="text/css"> #question{QID} .hidden-checkbox { padding: 0; } #question{QID} .hidden-checkbox label { padding: 0; font-weight: bold; font-style: italic; } #question{QID} .hidden-checkbox label::before, #question{QID} .hidden-checkbox label::after { display: none; } </style>
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ var qID = '{QID}'; $('li[id$="X'+qID+'t1"]').addClass('hidden-checkbox'); // SQ code t1 $('li[id$="X'+qID+'t2x1"]').addClass('hidden-checkbox'); // SQ code t2x1 $('li[id$="X'+qID+'t2x2"]').addClass('hidden-checkbox'); // SQ code t2x2 $('li[id$="X'+qID+'t2x3"]').addClass('hidden-checkbox'); // SQ code t2x3 $('#question{QID} .hidden-checkbox input').remove(); }); </script> <style type="text/css"> #question{QID} .hidden-checkbox { padding: 0; } #question{QID} .hidden-checkbox label { padding: 0; font-weight: bold; font-style: italic; } #question{QID} .hidden-checkbox label::before, #question{QID} .hidden-checkbox label::after { display: none; } </style>
asilbering wrote:
I was also wondering if there is a way to use the subquestion code to specify the check boxes to be hidden in the following line, rather than using the subquestions "number":
$('#question{QID} .answers-list li:eq(0)').addClass('hidden-checkbox');
Ana
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { var thisQuestion = $('#question{QID}'); // Remove some text inputs $('.checkbox-text-item:eq(0) .comment-item', thisQuestion).remove(); $('.checkbox-text-item:eq(8) .comment-item', thisQuestion).remove(); $('.checkbox-text-item:eq(16) .comment-item', thisQuestion).remove(); }); </script>