Please help us help you and fill where relevant:
Your LimeSurvey version: LimeSurvey Community Edition Version 5.4.15+221212
Own server or LimeSurvey hosting: Own
Survey theme/template: Fruity
==================
Greetings.
I need to keep the last option at the end of an array when randomizing the sub-questions. The problem is that the last sub-question also contains a text field (inserted using a script & instructions from Tony). I tried fixing the position of the last sub-question using another Tony script (as below). Without the text field inserted, this works perfect. With the text field inserted, randomization also moves this text field and does not keep it with the last sub-question. Any ideas how I can keep the last sub-question and the text field together?
lss attached.<script type="text/javascript" charset="utf-8">
$(document).on('ready pjax:complete',function() {
// Define the subquestion code to be fixed at the bottom of the array
var fixedCode = '10';
// Move that row to the bottom
$('#question{QID} table.subquestion-list tbody:eq(0)').append($('tr[id$="X{QID}'+fixedCode+'"]'));
// Fix up the row background colours
$('#question{QID} tr.answers-list').
each
(function(i){
$(this).removeClass('ls-even, ls-odd');
if(i % 2 == 0) {
$(this).addClass('ls-even');
}
else {
$(this).addClass('ls-odd');
}
});
});
</script>