iFrame Does Not Scroll to Top After "Next".

  • srfyouthprogrms
    Asked on May 1, 2024 at 1:57 PM

    Hi,

    already tried window.parent.scrollTo(0,0)

    still the form next page is going to the middle of the second form page


     <iframe     id="JotFormIFrame-230896518154160"     title="Online Summer Program Registration June 2024"     onDISABLEDload="window.parent.scrollTo(0,0)"     allowtransparency="true"     allow="geolocation; microphone; camera; fullscreen"     src="https://form.jotform.com/230896518154160"     frameborder="0"     style="min-width:100%;max-width:100%;height:539px;border:none;"     scrolling="no"   >   </iframe>   <script src='https://cdn.jotfor.ms/s/umd/latest/for-form-embed-handler.js'></script>   <script>window.jotformEmbedHandler("iframe[id='JotFormIFrame-230896518154160'", "https://form.jotform.com/")</script>   

  • srfyouthprogrms
    Replied on May 1, 2024 at 2:01 PM

    Any CSS needed apart from the window.parent.scrollTo(0,0)?

    Could we potentially inject below?

    div.form-all > ul:nth-child(3) {

        margin-top: 150px !important;

    }

  • Kyle JotForm Support
    Replied on May 1, 2024 at 4:13 PM

    Hi srfyouthprogrms,

    Thanks for reaching out to Jotform Support. Can you share with us the page URL again? The URL you shared isn't available. The issue you're experiencing could be caused by the iFrame not being able to scroll up to any fields in your form. The iFrame can only recognize fields inside its frame. To position your iFrame, you can try adding the following custom CSS to your webpage:

    .sqs-block-content {
        position: inherit;
        top: 0px;
        left: -200px;
        width: 1280px;
        height: auto;
    }

    But please note that this may cause the website to become wider than your screen and the form to no longer be centered. To fix this, remove the left and width arguments above.

    If the issue persists, can you take a screenshot and send it to us? We have a guide here explaining how to do that. It would help us to understand what’s happening.

    Give it a try and let us know if you need any help.

 
Your Answer