Hy everybody! I am conducting a survey whose data will be used also for my graduation
thesis. In our survey questionnaire we randomize an array of items and ask
respondents to choose some "best" (most important) items and, as a second
question, the "worst" (least important) item from the reduced array. We
are unable to keep the initially randomized array because LimeSurvey newly
randomize the array for the second question.
Does anybody know if and how it is possible to keep for the second
question the same order of the items as the initial randomization (that is the same order of the randomized items of the first question)?
Thank you very much.
3) Place the following script in the source of Q1.
Code:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
// Identify the questions
var q1ID = '{QID}';
var q1 = $('#question'+q1ID+'');
var q2 = $(q1).nextAll('.array-flexible-row:eq(0)');
var q2ID = $(q2).attr('id').split('question')[1];
// Sort the Q2 array rows into same order as Q1
$('tr.answers-list', q1).each(function(i){
var thisCode = $(this).attr('id').split('X'+q1ID)[1];
$('table.subquestions-list tbody', q2).append($('tr.answers-list[id$="X'+q2ID+thisCode+'"]'));
});
// Fix up the Q2 array row background colours
$('tr.answers-list', q2).each(function(i){
$(this).removeClass('array1 array2').addClass('array'+(2-(i%2)));
});
});
</script>