Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Scrolling to mandatory question errors

Scrolling to mandatory question errors 3 months 2 weeks 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 3 months 1 week ago #93474

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2948
  • Thank you received: 448
  • Karma: 254
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

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 3 months 1 week ago #93527

  • Ben_V
  • Ben_V's Avatar
  • OFFLINE
  • Platinum Lime
  • Posts: 749
  • Thank you received: 139
  • Karma: 46
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 3 months 1 week ago #93529

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 4521
  • Thank you received: 472
  • Karma: 168
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 3 months 1 week ago #93532

  • Ben_V
  • Ben_V's Avatar
  • OFFLINE
  • Platinum Lime
  • Posts: 749
  • Thank you received: 139
  • Karma: 46
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 3 months 2 days ago #93884

  • sys_sby
  • sys_sby's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 22
  • 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 3 months 1 day ago #93906

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2948
  • Thank you received: 448
  • Karma: 254
Already asked and answered in your other post.
Cheers,
Tony

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
  • Page:
  • 1
Moderators: DenisChenu, ITEd
Time to create page: 0.244 seconds
Donation Image