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

  • sacredsmile
    Asked on December 11, 2014 at 7: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.

  • Ashwin JotForm Support
    Replied on December 11, 2014 at 9: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="https://secure.jotformeu.com/form/30981657147361?type=Venn" 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!

  • meinplattenvertrag
    Replied 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?

  • Ashwin JotForm Support
    Replied 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:  http://www.jotform.com/answers/484163 

    Thank you!