• Resolved manariba

    (@manariba)


    When a user tries to submit the form with errors, the page reloads and stays on top. I need the page to automatically scroll down to the bottom of the page to the contact form location.

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

    (@andrewshu)

    Hello @manariba

    You could try to use this code example (this is only example, maybe you need to improve it):

    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 manariba

    (@manariba)

    Thanks, that’s working!

    But now my CSS code isn’t working anymore:

    /**
    * Hide error messages under fields.
    */
    .um-field .um-field-error {
    display: none;
    }

    Why is this?

    Plugin Support andrewshu

    (@andrewshu)

    Hello @manariba

    Check the code and where did you paste it. My JS code can’t break your CSS code.

    Regards.

    Thread Starter manariba

    (@manariba)

    Nevermind, it worked. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.