I installed latest version of limesurvey to give it a try.
i like it very much but I need advise on how to do one thing:
I have a multiple choices question with approximately 70 choices. From this a user must check at most 12. Since he can check so many answers I want a possibility for him to show near the question (up or down) a field with how many choices he checked (real time) or how many he has left (this is even better) -some kind of real time counter.
Is this possible???
I found on the internet this script but for some reason it doesn't work:
Code:
<script type="text/javascript">
function Custom_On_Load(){
$(document).ready(function() {
/* Hide the answer box from this current question, because we will store the value of the count in this question */
$( ‘#question77′ ).hide();
$( ‘#question76 td.answer input.checkbox’ ).change(function() {
var checkedCount = 0;
$( ‘#question76 td.answer input.checkbox’ ).each(function(i) {
if ( $( this ).attr(‘checked’) == true ) {
checkedCount++;
}
});
if ( checkedCount > 1 ) {
$( ‘#question77 td.answer input.checkbox’ ).attr(‘checked’, true);
}
else {
$( ‘#question77 td.answer input.checkbox’ ).attr(‘checked’, false);
}
});
});
}
</script>
where 76 and 77 are the question's ID (I think...).
Can someone please tell me if there is something wrong with this code or if there is any other possibility to achieve what I described at the start of the topic?