Alert for blank questions

More
2 years 11 months ago #136474 by psoliveira
First i would like to say that i don't have experience of javascript, thus my post for help.

I would like to have alerts for all blank questions.
I've found this code from tpartner for radiobuttons
<script type="text/javascript" charset="utf-8">	
 
	$(document).ready(function() { 
 
		var confirmShown = 0;
 
		// Interrupt the submit process
		$('#movenextbtn, #movesubmitbtn').bind('click', function () {
			if($('input.radio:checked').length != $('.list-radio:visible').length && confirmShown == 0) {
				confirmShown = 1;
				var moveOn = confirm("Some questions remain unanswered. \nDo you want to continue?");
				if (moveOn == false) {
					return false;
				}
			}
		});
 
	});
</script>

Is there a way to validate all blank answers?

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
2 years 11 months ago #136478 by tpartner
Replied by tpartner on topic Alert for blank questions
The script would need to be modified depending on the question types on a given page.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in or Create an account to join the conversation.

More
2 years 10 months ago - 2 years 10 months ago #137418 by psoliveira
Thank you for your answer.
That's is my problem exactly, i don't known how to reference the different question types.
At this point i'm using the following question types:
list (dropdown)
list (radio)
array
array (texts)
array (numbers)
array by column
numerical input
multiple numerical input
yes/no
date/time
short free text
multiple choice

Could you please help me with that?
Last edit: 2 years 10 months ago by psoliveira. Reason: misspeling

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!