It's odd but I can't get the code below to work in 2.00.
I have a check box array, and I need people to answer every question (as there is conditional logic that follows). If I make it non mandatory I get the 'no answer' check but setting the 'minimum questions' = total number, it doesn't accept the 'no answer' as a response.
So if I make it mandatory but include a 6th option ('I don't know') how can I make Limesurvey complete that box by default when the question opens? That way if the respondent doesn't change it they have still 'answered' all the questions for the system.
Probably doing something silly. I presume I just copy this code into the question (I know java code is working in my survey through a test one I ran).Question attached.
Ideas would be very welcome.
Lloyd.
Code:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
var qID = QQ;
// Loop through the rows and check the first radio if none are already checked
$('#question'+qID+' table.question tbody tr').each(function(i) {
if($('input.radio:checked', this).length == 0) {
$('input.radio:eq(0)', this).attr('checked', true);
}
});
});
</script>