Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Scrolling to mandatory question errors

More
11 years 1 week ago #93311 by psoo
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 topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 1 week ago #93474 by tpartner
Replied by tpartner on topic Scrolling to mandatory question errors
Try adding this to the end of template.js:
Code:
$(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.
The topic has been locked.
More
11 years 1 week ago #93527 by Ben_V
Replied by Ben_V on topic Scrolling to mandatory question errors
Hello Tony,
Is it possible in the same time to disable the original prompt alert?

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 1 week ago #93529 by DenisChenu
Replied by DenisChenu on topic Scrolling to mandatory question errors

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

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: Ben_V
The topic has been locked.
More
11 years 1 week ago #93532 by Ben_V
Replied by Ben_V on topic Scrolling to mandatory question errors
Thank you Denis,
$showpopups added to my list of completly forgotten useful optional settings!

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The topic has been locked.
More
11 years 1 day ago #93884 by sys_sby01
Replied by sys_sby01 on topic Scrolling to mandatory question errors
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 topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
11 years 23 hours ago #93906 by tpartner
Replied by tpartner on topic Scrolling to mandatory question errors
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.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose