Javascript code to add to iframe to auto-adjust height on form

  • Profile Image
    Asked on December 11, 2014 at 07:16 AM

    Hi. I have set multiple conditions on my form. What happens is that there is a large blank space beneath the form. Is there any code i can add to the iframe code so that the height of the form auto-adjusts?

    I have also tried the "embed"-code. The form then auto-adjust but the form then has trouble with the conditions. Very often all the conditions are excluded.

  • Profile Image
    Answered on December 11, 2014 at 09:54 AM

    Hello sacredsmile,

    The script code which is added to the iFrame embed code should actually adjust the height of the iFrame automatically. It seems it is not working as expected in your web page.

    Can you please use just the following iFrame code in your web page and see if that helps your problem:

    <iframe id="JotFormIFrame" allowtransparency="true" src="" frameborder="0" style="width:100%; height:950px !important; max-height:950px !important;border:none;" scrolling="yes"></iframe>

    Hope this helps.

    Do get back to us if the issue persists.

    Thank you!

  • Profile Image
    Answered on December 30, 2014 at 11:08 AM

    Hi Jotform,


    I have the same problem using iFrame. The blank scape beneath the form never changes - also if I change the heights manually in the iFrame code. Nothing happens. I need to embed it as an iFrame because it´s the only option that works on Smartphones.

    How can I fix that?

  • Profile Image
    Answered on December 30, 2014 at 11:20 AM

    Hello meinplattenvertrag,

    I have moved your question to a new thread and you will be answered here: 

    Thank you!