Assuming you are using 2.05...
1) Add a hidden <p> element to the source of Q2 and use Expression Manager to pipe the Q1 results into that element. There may be a better way to do it, but something like this:
Code:
<p class="q1-answers" style="display:none;">{if(Q1_a == "Y", ",a", '')}{if(Q1_b == "Y", ",b", '')}{if(Q1_c == "Y", ",c", '')}{if(Q1_d == "Y", ",d", '')}{if(Q1_e == "Y", ",e", '')}{if(Q1_f == "Y", ",f", '')}</p>
2) Add this script to that question source (I think the comments explain it):
Code:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
// Identify this question
var thisQuestion = $('#question{QID}');
var thisQuestionID = '{QID}';
// Create an array of the Q1 answered codes
var q1Answers = $('p.q1-answers', thisQuestion).text().replace(/,/, '');
var q1AnswersArr = q1Answers.split(',');
// Shuffle the array
function shuffle(o){
for(var j, x, i = o.length; i; j = parseInt(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
return o;
}
shuffle(q1AnswersArr);
// Check the first 3 options in the array
$(q1AnswersArr).each(function(i) {
if(i < 3) {
var thisCode = $.trim(this);
$('input[type="checkbox"][id$="X'+thisQuestionID+thisCode+'"]', thisQuestion).prop('checked', true);
}
});
});
</script>
.