Hi guys,
I'm trying to use the workaround for making specific rows of a radio-matrix mandatory:
www.limesurvey.org/manual/Workarounds:_M...f_an_array_mandatory
Similar code found in the forum:
www.limesurvey.org/de/forum/can-i-do-thi...-multiple-short-text
My problem is with this built-in disabling-navigation-buttons. I use this line:
Code:
$('#moveprevbtn, #movenextbtn, #movesubmitbtn').attr('disabled', '');
like in the workaround but the buttons still getting disabled when my condition is false.
Minimal example of the code:
Code:
<script type="text/javascript" charset="utf-8">
// Wait until the document is fully loaded
$(document).ready(function() {
// Interrupt the submit function
$('form#limesurvey').submit(function () {
// Override the built-in "disable navigation buttons" feature
$('#moveprevbtn, #movenextbtn, #movesubmitbtn').attr('disabled', '');
// The text to appear in the warning element
var warningText = 'Exception: Eine oder mehrere Pflichtfragen sind nicht beantwortet worden. Bitte beantworten Sie diese zuerst, um fortzufahren!';
// The question ID
var questionID = 858;
//here comes a validation with a result SQall true or false.
//...
//...
var SQall = false;
if (SQall == false) {
alert(warningText);
return false;
}
else {
return true;
}
});
});
</script>
Version: 2.05+ Build 140821
Any suggestions, or is this workaround for another version?
Thanks
Stefan