What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

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

    Asked by sacredsmile 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.

    Page URL:
    https://verdigesmil.no/bli-frivillig/bli-en-forkjemper/venn/

    height iframe code blank space multiple conditions
  • Profile Image
    JotForm Support

    Answered by ashwin_d 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="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!

  • Profile Image

    Answered by meinplattenvertrag 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
    JotForm Support

    Answered by ashwin_d 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!