- Posts: 11
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Titles for subquestions
- cstcandy
- Topic Author
- Offline
- New Member
I use the following script to "hide" the checkbox of particular codes.
The Blankbutton.png is a transparent picture and saved in the template editor.
My next question - is it possible to randomize the answers within groups and then randomize between groups? Thanks so much!
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
var templatePath = $('head link[href*="template.css"]').attr('href').replace(/template.css/, '');
// Apply images to Group 1 $("input#answerYYYYXYYYYXYYYYYY").imageTick({
// Image to use as a selected state of the checkbox
tick_image_path: templatePath+"Blankbutton.png",
// Image to use as a non-selected state
no_tick_image_path: templatePath+"Blankbutton.png",
// Class to apply to all checkbox images that are dynamically created
image_tick_class: "checkboxes"
});
});
</script>
- tpartner
- Offline
- LimeSurvey Community Team
- Posts: 10634
- Thank you received: 3698
You could do that with with JavaScript but without knowing the structure of your template it's impossible to give a code example.My next question - is it possible to randomize the answers within groups and then randomize between groups? Thanks so much!
An alternative may be to use several questions and CSS to make them appear as one. Again without template details it's impossible to give a code example.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
- tixeon
- Offline
- Senior Member
- Posts: 78
- Thank you received: 2
- tpartner
- Offline
- LimeSurvey Community Team
- Posts: 10634
- Thank you received: 3698
Can you attach a small sample survey (.lss file)?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
- tixeon
- Offline
- Senior Member
- Posts: 78
- Thank you received: 2
LSS attached
- tpartner
- Offline
- LimeSurvey Community Team
- Posts: 10634
- Thank you received: 3698
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ // First Row $('#question{QID} .question-item:eq(0)').addClass('sub-header').find('input').remove(); // Fifth Row $('#question{QID} .question-item:eq(4)').addClass('sub-header').find('input').remove(); // Ninth Row $('#question{QID} .question-item:eq(8)').addClass('sub-header').find('input').remove(); // Fourteenth Row $('#question{QID} .question-item:eq(13)').addClass('sub-header').find('input').remove(); }); </script> <style> .question-item.sub-header, .question-item.sub-header label { padding: 0; margin-bottom: 0; } .question-item.sub-header label::before, .question-item.sub-header label::after { display: none; } </style>
Sample survey attached:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.