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

    Embedded jotform is always cut off even when using iframe

    Asked by memaxt on November 26, 2014 at 08:27 AM

    Hi there,

    I'm trying to embed 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:7134px; 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;}};if (window.addEventListener) {window.addEventListener("message", handleIFrameMessage, false);} else if (window.attachEvent) {window.attachEvent("onmessage", handleIFrameMessage);}</script>

    I know you can do it without the script and adjust height manually.

    But regardless of that, when I go to preview my form within jotform it cuts off in the preview aswell! is there something wrong with jotform??

    I got to embed form > iframe > Preview   and the form is cut off. Even if i paste the code into a empty html page it still cuts off, It never used to do that..I need the script above to work so when the user goes to the next page it scrolled back to the top of the page.

    I'm having to use iframe rather than embedding the source code or directlink because the NEXT BUTTON doesnt work!!!! for many many many users!! I know you will test it and say you cant replicate the problem..but it exists! even if I embed it on an empty html page! using IE 8 9 10 & firefox!!

    whats going on???

    form cut off embedding embedded form
  • Profile Image
    JotForm Support

    Answered by KadeJM on November 26, 2014 at 10:50 AM

    I see you are having an issue with embedding your jotform.

    The first thing we'd like to know is where are you planning on embedding your jotform? Can you please share a link to your website which you are trying to embed it on?

    Also it is helpful to know what hosting platform and|or service you are embedding it on but usually if you provide us with a link we can usually figure that out ourselves to aid you in this process.

    The default javascript code is usually recommended first. However, in cases where that doesn't work only then would we recommend the iframe. And then if then iframe isn't working then that is when we advise removing the bottom script of the iframe depending on the problem. As for the source code that is actually more intended for custom usages. If you're unsure of which code would suite you then just take look at this guide to get a better idea.

    Additionally, I would like to point out that we no longer support IE8 or prior to it.

    You had even stated you're using Firefox. Can you please tell us what version of Firefox you are experiencing this issue in?

    It is highly recommended to use the latest version of your software and hardware to avoid complications so that your jotforms work properly.

    Also, I had noticed that you are using a secured version of your jotform so please note that this will only work with a secured version of your website. You need to match it with the domain you are using accordingly otherwise that can lead to unexpected problems.

    When I checked this I could see your iframe with the script removed including the direct link of your jotform were both working on my end anyhow and even your preview. But so far as you probably figured already I'm unable to replicate the issue at the moment. Could you please tell us where you are trying to embed it we can help you better with resolving this issue.

     

    Lastly, I have cleared your form cache to refresh your jotforms for you from our end so hopefully that helps. I would highly recommend clearing your browser cache as well then try again.