How to stop the page from automatically scrolling without disabling the scrollbar?

  • Profile Image
    wwwjont
    Asked on August 30, 2017 at 06:56 AM

    Hi,

    I am currently setting up a disclaimer form on my website. I find that when a user clicks on the submit button and they haven’t ticked the agree to terms and conditions checkbox an error message is displayed stating that this field is required. The problem is that when the error message is displayed the scrollbar automatically scrolls half way down the page (giving focus to the error message) and pulls the top half of the page offscreen. Is it possible to have the error message displaying without the scrollbar moving. I know that I can disable the scrollbar but I want to avoid using this option. I was also wondering is it possible to remove the “There are errors on the form. Please fix them before continuing.” Part of the error message.

     Thanks

    John

     

  • Profile Image
    Kiran
    Answered on August 30, 2017 at 08:38 AM

    I have checked your web page and am able to replicate the issue at my end. As I check the web page, I see that the form is embedded using the source code of the form. Could you try embedding the form using the iframe embed method to see if that works? 

    You may get the iframe embed code for your JotForm by following the steps in the guide below:

    https://www.jotform.com/help/148-Getting-the-form-iFrame-code 

    Please get back to us if you need any further assistance. We will be happy to help. 

  • Profile Image
    wwwjont
    Answered on August 31, 2017 at 12:01 PM

    Hi I have used the Iframe embed method but unfortunately it didn't work. I was also wondering is it possible to remove the “There are errors on the form. Please fix them before continuing.” Part of the error message.

     

    Thanks

  • Profile Image
    Kiran
    Answered on August 31, 2017 at 12:28 PM

    Could you try embedding the form using the script within the iframe tag as shown in the colored text in the screenshot below?

    Also, please add ?nojump to the form URL in the embed code as mentioned below: 

    https://form.jotformeu.com/72365495917368?nojump

    Please get back to us if the issue still persists. We will be happy to assist you further. 

  • Profile Image
    wwwjont
    Answered on September 01, 2017 at 05:23 AM

    Hi

    have done what you have asked me to do but the problem is still there.

     

    I was also wondering is it possible to remove the “There are errors on the form. Please fix them before continuing.” Part of the error message.

    Thanks

    John

  • Profile Image
    Welvin
    Answered on September 01, 2017 at 07:07 AM

    That's how the form works when a required field is skipped. It jumps to the first required field. The problem is that your website also moved to the top when the required field validation function is triggered. 

    I think you will need to check your website codes such as the height, top margin, and top paddings. This way, when the form jumps, the website won't jump to the top or least the position will be corrected. 

  • Profile Image
    wwwjont
    Answered on September 01, 2017 at 07:23 AM

    No Problem I will check my website. Can you answer the other part of the question that I asked.

    Is it possible to remove the “There are errors on the form. Please fix them before continuing.” Part of the error message.

    I want the "This is a required field" to show but I don't want the "There are errors on the form. Please fix them before continuing." to show.

    Maybe your programmers have not left it possible to remove this secondary part of the error message.

     

    Thanks

    John

     

  • Profile Image
    BJoanna
    Answered on September 01, 2017 at 10:01 AM

    Considering that your other question is not related to the subject of this thread, I have moved it to a separate thread and we will provide you an answer there shortly. 

    https://www.jotform.com/answers/1238008