iFrame code not showing entire form when hidden fields are displayed

  • alak12
    Asked on August 3, 2015 at 1:37 PM

    I have a form that has worked well for several hundred submissions, however, now it isn't showing all of the fields when fields that are initially hidden are displayed after certain options are selected.  At first I thought it was an issue with my web host.  I have contacted them and their response is that there is some code within the iFrame code that is over riding the height parameter.  How can I go about fixing this so that I can display the form embedded in my website, without the scrolling bars?

    The form can be seen by going to:

    http://www.americanleadership.net/apps/pages/index.jsp?uREC_ID=216250&type=d&pREC_ID=683277

    and

    http://form.jotform.us/form/50264649781160

     

  • Mike
    Replied on August 3, 2015 at 2:29 PM

    Unfortunately, the iFrame embedding method does not come with an auto-height option to resize the form container when conditions are met. 

    Have you tried our Embed JS code? It resizes the form automatically.

    iFrame code not showing entire form when hidden fields are displayed Image 1 Screenshot 20

    Although, the Embed code may conflict with other scripts of the web page in some cases. If this is not going to work, we will need to work with the size of the form iFrame on your page.

  • alak12
    Replied on August 4, 2015 at 3:31 PM

    Thanks for your response.  Previously I was having trouble with the Java embed showing the form and another support person told me to use the iFrame code.  With this particular form, I have tried to adjust the height and haven't had any luck.  That's when I turned to my webhost support people thinking the issue was on their end.  However, they were also unsuccessful in adjusting the vertical height code to make it work.

     

    Any ideas on what could be causing the parameter to be over ridden?

  • Mike
    Replied on August 4, 2015 at 3:54 PM

    The iFrame height is affected by a script that follows the iFrame code. You can either remove the script, or simply add an !important declaration to the height style.

    Example:

    <iframe id="JotFormIFrame" onDISABLEDload="window.parent.scrollTo(0,0)" allowtransparency="true" src="//form.jotformpro.com/form/52155607278964" frameborder="0" style="width:100%; height:2500px !important; border:none;" scrolling="no"></iframe>

    iFrame code not showing entire form when hidden fields are displayed Image 1 Screenshot 20

    It should set a static height of the iFrame. Let us know if you need any further assistance on this.