How To Embed Multiple Forms in Website

  • niksev
    Asked on February 5, 2015 at 6:43 PM

    Для лендинга нужно много одинаковых форм по всему сайту. Но когда ставишь больше одного, остальные просто исчезают. 

  • Charlie
    Replied on February 5, 2015 at 9:12 PM

    Hi,

    I'm not sure if I understand your question completely. Would you like to add multiple forms in your website but doing so other forms disappear? If this is the case, I believe you need to embed your forms in an iframe, with this, the forms will not be a conflict to each other's code.

    Here's a way on how to get your iFrame.

    How To Embed Multiple Forms in Website Image 1 Screenshot 20

     

    Please do take note that when you copy the iFrame code, make sure that you remove the <script> code associated or included on it. Here's an example.

    When I copy my iFrame code, here's what I get:

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

    What you need in your website is only the code wrapped in <iframe> tag (which is the light blue highlight), you will then need to remove the <script> code in your website (which is the pink highlight above). 

    If you are still having problems, please do share with us the website where the form is embedded so that we can check it further.

    Thank you.