Apologies for not giving more information! You'll find a sample survey attached.
I used the workaround discussed
here
(a simple array) and
here
.
In my sample survey, the testrank question filters answers from behavioursSELECT and behavOtherIDENTIFY. That works great! What I can't figure out is how to dynamically adapt the answer options in testrank depending on the number of subquestions that appear, so 1 to 5 if 5 subquestions appear, etc. Participants then have to rank the x subquestions by importance from 1 to x.
I also tried using this script to make sure participants can't choose the same ranking twice:
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
// Identify this question
var qID = {QID};
// Answers are exclusive by column
$('#question'+qID+' input[type="radio"]').click(function(event){
var thisAnsCode = $(this).attr('id').split('-')[1];
$('#question'+qID+' input[id$="-'+thisAnsCode+'"]').prop('checked', false);
$(this).prop('checked', true);
});
});
</script>
But it only seems to work for radio buttons and not dropdowns.
Let me know if this is enough information!
Thanks!
Gen