Please help us help you and fill where relevant:
Your LimeSurvey version: Community Edition Version 6.0.4+230427
Own server or LimeSurvey hosting: own
Survey theme/template: fruity
==================
Hello!
I have been using the following script (from
here
) to fix positions at the bottom (below "Other"-option) in version 3.
Code:
<script type="text/javascript" charset="utf-8">
$(document).on('ready pjax:scriptcomplete',function(){
// Identify this question
var qID = {QID};
var thisQuestion = $('#question'+qID);
// Define the sub-question codes to be placed last
var lastItems = ['SQ006', 'SQ007', 'SQ008'];
// Loop through those sub-question codes
$.each(lastItems, function(i, val) {
// Move that item to the end of the list
// Multi-choice question
if($(thisQuestion).hasClass('multiple-opt')) {
$('.question-item[id$=X'+qID+val+']', thisQuestion).appendTo($('.question-item[id$=X'+qID+val+']', thisQuestion).parent());
}
// Array question
if($(thisQuestion).hasClass('array-flexible-row')) {
$('.answers-list[id$=X'+qID+val+']', thisQuestion).appendTo($('table.subquestion-list tbody:last', thisQuestion));
}
// List-radio question
if($(thisQuestion).hasClass('list-radio')) {
$('.answer-item[id$=X'+qID+val+']', thisQuestion).appendTo($('.answer-item[id$=X'+qID+val+']', thisQuestion).parent());
}
});
});
</script>
It seems it's not working anymore (at least for multi-opt) but I can't find out what to change.
Moreover, I found very strange behaviour of the option I set as an exclusive option. It always is fixed in a position when randomising (even without any script), but always one above its position in the answer list. So when I set the second option as exclusive, it fixes it to the first position. If I set the last option as exclusive, its fixed in the second to last option. Is this a bug?