How to disable scrolling in embedded form?

  • mahdikabir
    Asked on May 7, 2024 at 1:16 PM

    I am trying to use the forms in my web application. I can disable scrolling but when a form page takes full height it goes out of the screen. I am using iframes. is there any way to force jotform to fit in the screen? I do not want scrolling at all. I tried resizing the iframe but that just cuts off the form instead of resizing it.

  • Joeni JotForm Support
    Replied on May 7, 2024 at 1:52 PM

    Hi Mahdi,

    Thanks for reaching out to Jotform Support. I understand that you want to disable scrolling in your embedded form. Can you please share your Form URL and where is the form embedded so we can investigate it further? 

    Once we hear back from you, we'll be able to help you with this.

  • mahdikabir
    Replied on May 7, 2024 at 1:55 PM


      <iframe

       id="JotFormIFrame-241124479913256"

       title="Square Charity Donation Form"

       onDISABLEDload="window.parent.scrollTo(0,0)"

       allowtransparency="true"

       allow="geolocation; microphone; camera; fullscreen"

          src="https://form.jotform.com/241124479913256"

       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-241124479913256'", "https://form.jotform.com/")</script>

       

    This is the embed code and this is the form:

    https://www.jotform.com/build/241124479913256

  • Joeni JotForm Support
    Replied on May 7, 2024 at 2:48 PM

    Hi Mahdi,

    Thanks for getting back to us. Can you please try adding this embed code to your website.

    <iframe id="JotFormIFrame-241124479913256" title="Square Charity Donation Form" onDISABLEDload="window.parent.scrollTo(0,0)" allowtransparency="true" allow="geolocation; microphone; camera; fullscreen" src="https://form.jotform.com/241124479913256" frameborder="0" style="min-width:100%;max-width:100%;height:539px; min-Height:950px; 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-241124479913256'", "https://form.jotform.com/")</script>

    Also, Inject this CSS code into your form to remove the horizontal scrollbar.

    .form-all{border:0 !important;}

    Let me show you how to Inject Custom CSS Code:

    1. In Form Builder, click the Paint Roller icon.
    2. Under Form Designer, select the Style tab.
    3. And, add the Custom CSS Code to the Inject Custom CSS Box.

    How to disable scrolling in embedded form? Image 1 Screenshot 20

    Give it a try and let us know how it goes.

 
Your Answer