Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Idiot Detector

Idiot Detector 1 Jahr 10 Monate her #89775

  • helper
  • helpers Avatar
  • OFFLINE
  • Expert Lime
  • Beiträge: 126
  • Dank erhalten: 18
  • Karma: 0
I thought that I had seen most everything... whoa, wrong assumption.

The request that I received includes validating a question and/or group (depending on how the admin settings are setup) at submit (or next). If the user did not answer the question(s) then they should get a javascript confirm - if the user selects cancel then it will return false back to the question(s) otherwise the submit goes through. The use case they gave is a validation message to either skip the question (confirm) or return to the question (return false).

Seems to be another usability idiot detector to me...

Has anybody else ran into this type of requirement and how did you resolve?
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: Idiot Detector 1 Jahr 10 Monate her #89781

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 4263
  • Dank erhalten: 801
  • Karma: 367
It's easy to interrupt the submit with a confirm message but the code that triggers it (if questions are unanswered) would depend on the question types on the page.
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: Idiot Detector 1 Jahr 10 Monate her #89891

  • helper
  • helpers Avatar
  • OFFLINE
  • Expert Lime
  • Beiträge: 126
  • Dank erhalten: 18
  • Karma: 0
Is the global $notanswered boolean common to all questions and would that be a better catch/trigger?
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: Idiot Detector 1 Jahr 10 Monate her #89935

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 4263
  • Dank erhalten: 801
  • Karma: 367
I don't know if it's common but regardless, it's server-side which would require modifying the core code.

After a little thought it gets a little messy anyway.You would need to put in something to prevent repeat confirms if the respondent goes back and modifies/answers a question. And if it were me taking the survey, I would get real cranky after a few pages with the confirms. Most surveys are onerous enough without extra clicks.
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Idiot Detector 1 Jahr 4 Monate her #96572

  • cmrodgers
  • cmrodgerss Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 1
  • Karma: 0
I am having this same issue. Did you ever figure out a resolution?

I was thinking that the script will have to be customized based on question type but I don't even know where to start!
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Idiot Detector 1 Jahr 4 Monate her #96574

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 4263
  • Dank erhalten: 801
  • Karma: 367
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>
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Letzte Änderung: 1 Jahr 4 Monate her von tpartner.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.141 Sekunden
Donation Image