Quantcast
Channel: Topics in Category: Can I do this with LimeSurvey? - LimeSurvey forums
Viewing all articles
Browse latest Browse all 17529

Idiot Detector - by: tpartner

$
0
0
Here is a post about applying "unanswered" and "answered" classes to questions.

You could then interrupt the "Next" function, look for unanswered questions and pop up a confirm message:

<script type="text/javascript" charset="utf-8">	
	$(document).ready(function(){
 
		// Interrupt the Next/Submit function
		$('form#limesurvey').submit(function(){
 
			// Override the built-in "disable navigation buttons" feature
			$('#moveprevbtn, #movenextbtn, #movesubmitbtn').attr('disabled', '');
 
			// Oops, found some unanswered questions...
			if ($('.unanswered').length > 0) {
				if(confirm('You have not answered all of the questions. Do you want to continue?')) { 
					return true;
				}
				else { 
					return false;
				}
			}
		});
	});
</script>

Viewing all articles
Browse latest Browse all 17529

Trending Articles