• Resolved aldenzuck

    (@aldenzuck)


    Hello, I have a registration form on the bottom of this page. However if there is an error with a field when you click Register, it refreshes the page and goes to the top of the page. This is really confusing as it makes it seem like the form was submitted, but they would have to scroll all the way down to see that there was an error.

    How can I set it up so that if there is an error after clicking Register it scrolls down to the form or to the specific error?

    • This topic was modified 11 months ago by aldenzuck.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support andrewshu

    (@andrewshu)

    Hello @aldenzuck

    Try to use this JS code:

    if( jQuery('.um-field-error').length > 0 ){
       var el = jQuery('.um-field-error').first()
       jQuery([document.documentElement, document.body]).animate({
          scrollTop: el.offset().top - 100
       }, 0);
    }

    Regards.

    Thread Starter aldenzuck

    (@aldenzuck)

    I spent hours trying to research a solution, and this did the trick immediately. Thank you!

    For extra context for others: I use Elementor and added the above code by editing with Elementor > going into the page settings > Advanced > Pasting the Javascript code shown above.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Registration Form Errors – How To Scroll Page Down To Error’ is closed to new replies.