Welcome, Guest
Username: Password: Remember me

TOPIC: Scrolling to mandatory question errors

Scrolling to mandatory question errors 1 year 7 months ago #93311

  • psoo
  • psoo's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 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!
The administrator has disabled public write access.

Scrolling to mandatory question errors 1 year 7 months ago #93474

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4272
  • Thank you received: 806
  • Karma: 369
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.
The administrator has disabled public write access.

Scrolling to mandatory question errors 1 year 7 months ago #93527

  • Ben_V
  • Ben_V's Avatar
  • OFFLINE
  • Platinum Lime
  • Posts: 1118
  • Thank you received: 253
  • Karma: 78
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...
The administrator has disabled public write access.

Scrolling to mandatory question errors 1 year 7 months ago #93529

  • DenisChenu
  • DenisChenu's Avatar
  • NOW ONLINE
  • Moderator Lime
  • Posts: 6451
  • Thank you received: 844
  • Karma: 249
Ben_V wrote:
Hello Tony,
Is it possible in the same time to disable the original prompt alert?
Use not know $showpopups in optional arry setting.

Denis
The administrator has disabled public write access.
The following user(s) said Thank You: Ben_V

Scrolling to mandatory question errors 1 year 7 months ago #93532

  • Ben_V
  • Ben_V's Avatar
  • OFFLINE
  • Platinum Lime
  • Posts: 1118
  • Thank you received: 253
  • Karma: 78
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...
The administrator has disabled public write access.

Scrolling to mandatory question errors 1 year 7 months ago #93884

  • sys_sby
  • sys_sby's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 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
The administrator has disabled public write access.

Scrolling to mandatory question errors 1 year 7 months ago #93906

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4272
  • Thank you received: 806
  • Karma: 369
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.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.121 seconds
Donation Image