How can I reduce the height of my embedded form?

  • mrdoherty108
    Asked on February 2, 2015 at 7:27 PM

    On my sharepoint site, the jot forms is taking too much space (vertically).  Is there a way I can cut the size down so the height of the form ends at the last question!  Thank you for any help you can provide!

    It's a chrome problem.  Feel free to visit the site using chrome, and see the white space caused by the jotform.

    <iframe id="JotFormIFrame" onDISABLEDload="window.parent.scrollTo(0,0)" allowtransparency="true" src="https://secure.jotform.us/form/41916294825159" frameborder="0" style="width:100%; height:250px; border:none;" scrolling="no"></iframe>

    <script type="text/javascript">window.handleIFrameMessage = function(e) {var args = e.data.split(":");var iframe = document.getElementById("JotFormIFrame");if (!iframe)return;switch (args[0]) {case "scrollIntoView":iframe.scrollIntoView();break;case "setHeight":iframe.style.height = args[1] + "px";break;case "collapseErrorPage":if (iframe.clientHeight > window.innerHeight) {iframe.style.height = window.innerHeight + "px";}break;case "reloadPage":window.location.reload();break;}};if (window.addEventListener) {window.addEventListener("message", handleIFrameMessage, false);} else if (window.attachEvent) {window.attachEvent("onmessage", handleIFrameMessage);}</script>

    Here's the code if this helps.  Thanks!

  • mrdoherty108
    Replied on February 2, 2015 at 7:36 PM
  • Ashwin JotForm Support
    Replied on February 2, 2015 at 11:53 PM

    Hello mrdoherty108,

    Please use the following iFrame embed code with fixed height to embed in your web page and that should solve your problem:

    <iframe id="JotFormIFrame" allowtransparency="true" src="https://secure.jotform.us/form/41916294825159" frameborder="0" style="width:100%; height:274px !important; max-height:274px !important;border:none;" scrolling="no"></iframe>

    Hope this helps.

    Do get back to us if you have any questions.

    Thank you!

  • mrdoherty108
    Replied on February 3, 2015 at 8:42 AM

    This is perfect!  Thank you!