Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Scrolling to mandatory question errors

Scrolling to mandatory question errors 1 Jahr 7 Monate her #93311

  • psoo
  • psoos Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 4
  • Karma: 0
Hi,

When filling in the survey a respondent skips a mandatory question and advances to next group (or submits the survey) - Limesurvey outputs errors to non-filled questions (or popup, if configured accordingly); does anybody know is it possible to configure LS to scroll automatically to a specific non-filled questions that caused the error?

Many thanks for any kind of feedback!
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Scrolling to mandatory question errors 1 Jahr 7 Monate her #93474

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 4281
  • Dank erhalten: 807
  • Karma: 370
Try adding this to the end of template.js:
$(document).ready(function() {
 
	if($('.errormandatory').length > 0) {
		$('html, body').animate({
			scrollTop: $('.errormandatory:first').offset().top
		}, 2000);
	}
});
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.

Scrolling to mandatory question errors 1 Jahr 7 Monate her #93527

  • Ben_V
  • Ben_Vs Avatar
  • OFFLINE
  • Platinum Lime
  • Beiträge: 1122
  • Dank erhalten: 255
  • Karma: 79
Hello Tony,
Is it possible in the same time to disable the original prompt alert?
Benoît

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Scrolling to mandatory question errors 1 Jahr 7 Monate her #93529

  • DenisChenu
  • DenisChenus Avatar
  • OFFLINE
  • Moderator Lime
  • Beiträge: 6451
  • Dank erhalten: 844
  • Karma: 249
Ben_V schrieb:
Hello Tony,
Is it possible in the same time to disable the original prompt alert?
Use not know $showpopups in optional arry setting.

Denis
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: Ben_V

Scrolling to mandatory question errors 1 Jahr 7 Monate her #93532

  • Ben_V
  • Ben_Vs Avatar
  • OFFLINE
  • Platinum Lime
  • Beiträge: 1122
  • Dank erhalten: 255
  • Karma: 79
Thank you Denis,
$showpopups added to my list of completly forgotten useful optional settings!
Benoît

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Scrolling to mandatory question errors 1 Jahr 7 Monate her #93884

  • sys_sby
  • sys_sbys Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 23
  • Karma: 0
Hello tpartner,

I need help and information,
where i can find class/ function file located for ('.errormandatory')?
Hoping i can to use javaScript for custom display

Thank you

Regards
sys_sby
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Scrolling to mandatory question errors 1 Jahr 7 Monate her #93906

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 4281
  • Dank erhalten: 807
  • Karma: 370
Already asked and answered in your other post.
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.
Moderatoren: ITEd
Ladezeit der Seite: 0.136 Sekunden
Donation Image