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

    Forms is being cut off when using iframe embed and it no longer jumps / scrolls up on switch to next page

    Asked by memaxt on March 25, 2015 at 06:40 AM

    Hi there,

    I'm having a problem when embedding my iframe using the following code:

    <iframe id="JotFormIFrame" onload="window.parent.scrollTo(0,0)" allowtransparency="true" src="https://secure.jotformpro.com/form/41321971075956" frameborder="0" style="width:100%; height:8641px; 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>

    Its cut off my form so I can only see a couple of fields. So what I have done is delete the script part as advised from jotform support so I can see the whole form using the following iframe.

    <iframe id="JotFormIFrame" onload="window.parent.scrollTo(0,0)" allowtransparency="true" src="https://secure.jotformpro.com/form/41321971075956" frameborder="0" style="width:100%; height:8641px; border:none;" scrolling="no"></iframe>

    THE PROBLEM

    This makes my webpage really long with empty space! and what's worse is i'm now unable to scroll back to the top of the form when using the page break!!!

    Can you help???? I'm constantly getting phone calls from angry users!

    Regards

    Max 

    height message iframe scroll
  • Profile Image

    Answered by Ben on March 25, 2015 at 10:45 AM

    Hi Max.

    I presume that you are referring to this thread: http://www.jotform.com/answers/465159-Embedded-jotform-is-always-cut-off-even-when-using-iframe

    Now in regards to the issue, could you please give us the link to the page where the jotform is at so that we can take a look at it and see the issue ourselves?

    It would help us understand more what happens and if there are alternative ways of fixing it up for you.

  • Profile Image

    Answered by memaxt on March 26, 2015 at 11:32 AM

    Hi there

    Thats correct,

    I cant share the link as you need to be registered on my website to view the page with the embeded form.

    but this issue is happening on all my forms and on different websites on which i embed them on. I think its a fault with the iframe code.

    This never used to happen but all of a suddenly it does...have you guys changed anything?

    Many thanks

    Max

  • Profile Image

    Answered by memaxt on March 26, 2015 at 11:34 AM

    Also changing the height: to 100% doesnt not fix the problem

  • Profile Image

    Answered by Ben on March 26, 2015 at 12:41 PM

    Unfortunately without seeing the code I can not be sure what might be the issue, but since you say that there is extra space being shown and I will presume that you are familiar with CSS and HTML enough to do the test by yourself, I would suggest trying to set the max-height value to iframe.

    For example:

    <iframe id="JotFormIFrame" onload="window.parent.scrollTo(0,0)" allowtransparency="true" src="https://secure.jotformpro.com/form/41321971075956" frameborder="0" style="width:100%; height:8641px; max-height: 7000px; border:none;" scrolling="no"></iframe>

    This would allow you to remove the empty space.

    However this does not tell us what is the issue with the form jump option. If you did not say already that it was embedded over iframe, I would presume that the issue is with the conflict within the script.

    Since that should not be the case (because of iframe embed) then the only thing that I can think of is to grab a full source code and make this feature by yourself.

    Would it be possible to create a public page or to save the page as you see it and upload it on some publicly available location so that we can inspect it? This would allow us to see what is the exact error.