• Resolved Sabina

    (@pessimisticoptimist)


    Hello again,

    I have a form at the bottom of a page, and after the user submits, the page reloads and the user is returned to the top of the page and therefore doesn’t see the message that their form was submitted successfully. I worry it will be a little confusing for them if they don’t know they have to scroll down the page to see the confirmation message. Is that they way the submission is supposed to behave? I ask because I saw an older support question about a Firefox javascript scroll to form error after submission, so I’m wondering if that used to happen. (I tested in current versions of Chrome, Firefox and Safari, none scrolled.)

    Thank you,
    Sabina

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Zhanna Khachatryan

    (@zhannak)

    Hi @pessimisticoptimist,

    Thanks for your inquiry.

    Please enter Form / Settings / Javascript Tab and in after_submit() function add the below code:

    setTimeout( function(){
            jQuery([document.documentElement, document.body]).animate({scrollTop: jQuery(".fm-form-container").offset().top}, 2000);
        }  , 1000 );

    Please get back to me with results.

    Thread Starter Sabina

    (@pessimisticoptimist)

    That did the trick! Thank you.

    Plugin Support Zhanna Khachatryan

    (@zhannak)

    Awesome @pessimisticoptimist!

    Thanks for keeping me updated with results.

    Good afternoon @zhannak
    I have the same issue then PessimisticOptimist.
    But I couldn’t manage to add the code in the proper place.
    Would you mind to tell me exactly were the code should go in the javasript tab?

    extract:
    // Occurs after form is submitted and reloaded
    function after_submit() {
    }

    May be I have a problem with some spaces…

    If you need the form is at the end of the page : https://www.geraldineclouard.com
    Thank you so much for your help!

    Plugin Support Zhanna Khachatryan

    (@zhannak)

    Hi @geraldine25,

    Please enter Form / Settings / Javascript Tab and in after_submit() function add the below code:

    jQuery(window).load(function()  {
       jQuery('html, body').animate({
           scrollTop: jQuery('.fm-form-container').offset().top
       }, 'slow');
    }); 

    Please check this screenshot to make sure that you have placed the code correctly.

    Thank you so much for being so precise. I did exactly as shown, unfortunately it didn’t work. I believe it comes from the fact that I use Elementor, and that the form is embedded in a “plugin” of them with its shortcode.
    I don’t have the paying version of Elementor, so i cannot add any custom CSS to that particular frame.
    I believe I reached a no-end situation. I believe I will have to use a page without elementor.

    Plugin Support Zhanna Khachatryan

    (@zhannak)

    Dear @geraldine25,

    In any case, the code should have work.

    can you please make sure that you have added the code exactly like I have shown in my screenshot, it would be good if you could send me your javascript tab screenshot to check.

    Dear user, if you are sure that you have added the code correctly, then the most probably you have a caching tool, that doesn’t allow to see changes, please clear the cache and check again.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Scrolling to see Confirmation Message after Submission’ is closed to new replies.