Hello, can you please assist with embedding into ClickFunnels, keeps erroring. Here is the code!

  • Profile Image
    Brooks_Rochelle
    Asked on July 04, 2021 at 04:57 AM



    <iframe

    id="JotFormIFrame-211833298712054"

    title="Form"

    onload="window.parent.scrollTo(0,0)"

    allowtransparency="true"

    allowfullscreen="true"

    allow="geolocation; microphone; camera"

    src="https://form.jotform.com/211833298712054"

    frameborder="0"

    style="

    min-width: 100%;

    height:539px;

    border:none;"

    scrolling="no"

    >

    </iframe>

    <script type="text/javascript">

    var ifr = document.getElementById("JotFormIFrame-211833298712054");

    if (ifr) {

    var src = ifr.src;

    var iframeParams = [];

    if (window.location.href && window.location.href.indexOf("?") > -1) {

    iframeParams = iframeParams.concat(window.location.href.substr(window.location.href.indexOf("?") + 1).split('&'));

    }

    if (src && src.indexOf("?") > -1) {

    iframeParams = iframeParams.concat(src.substr(src.indexOf("?") + 1).split("&"));

    src = src.substr(0, src.indexOf("?"))

    }

    iframeParams.push("isIframeEmbed=1");

    ifr.src = src + "?" + iframeParams.join('&');

    }

    window.handleIFrameMessage = function(e) {

    if (typeof e.data === 'object') { return; }

    var args = e.data.split(":");

    if (args.length > 2) { iframe = document.getElementById("JotFormIFrame-" + args[(args.length - 1)]); } else { 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;

    case "loadScript":

    if( !window.isPermitted(e.origin, ['jotform.com', 'jotform.pro']) ) { break; }

    var src = args[1];

    if (args.length > 3) {

    src = args[1] + ':' + args[2];

    }

    var script = document.createElement('script');

    script.src = src;

    script.type = 'text/javascript';

    document.body.appendChild(script);

    break;

    case "exitFullscreen":

    if (window.document.exitFullscreen) window.document.exitFullscreen();

    else if (window.document.mozCancelFullScreen) window.document.mozCancelFullScreen();

    else if (window.document.mozCancelFullscreen) window.document.mozCancelFullScreen();

    else if (window.document.webkitExitFullscreen) window.document.webkitExitFullscreen();

    else if (window.document.msExitFullscreen) window.document.msExitFullscreen();

    break;

    }

    var isJotForm = (e.origin.indexOf("jotform") > -1) ? true : false;

    if(isJotForm && "contentWindow" in iframe && "postMessage" in iframe.contentWindow) {

    var urls = {"docurl":encodeURIComponent(document.URL),"referrer":encodeURIComponent(document.referrer)};

    iframe.contentWindow.postMessage(JSON.stringify({"type":"urls","value":urls}), "*");

    }

    };

    window.isPermitted = function(originUrl, whitelisted_domains) {

    var url = document.createElement('a');

    url.href = originUrl;

    var hostname = url.hostname;

    var result = false;

    if( typeof hostname !== 'undefined' ) {

    whitelisted_domains.forEach(function(element) {

    if( hostname.slice((-1 * element.length - 1)) === '.'.concat(element) || hostname === element ) {

    result = true;

    }

    });

    return result;

    }

    }

    if (window.addEventListener) {

    window.addEventListener("message", handleIFrameMessage, false);

    } else if (window.attachEvent) {

    window.attachEvent("onmessage", handleIFrameMessage);

    }

    </script>

  • Profile Image
    Amin_N
    Answered on July 04, 2021 at 07:34 AM

    We sincerely apologize for any inconvenience you may have encountered.

    Can you please be more specific on the error and provide us with a link to where the form is embedded?

    We're patiently waiting for your response.

  • Profile Image
    Brooks_Rochelle
    Answered on July 04, 2021 at 07:33 PM
    Hello, and thank you.
    When I paste my iframe code into clickfunnels, it just shows me the words
    Javascript/HTML, and not my form. The instructions are super easy but I
    must be missing something. Clickfunnels are unable to assist as its a 3rd
    party code.
    http://www.click.bound2succeed.com/application
    Thanks
    Rochelle
    ...
  • Profile Image
    Vick_W
    Answered on July 05, 2021 at 12:59 AM

    Hi Rochelle,

    Could you please try embedding the form with iFrame code only? Please try the following:

    <iframe

    id="JotFormIFrame-211833298712054"

    title="Form"

    onload="window.parent.scrollTo(0,0)"

    allowtransparency="true"

    allowfullscreen="true"

    allow="geolocation; microphone; camera"

    src="https://form.jotform.com/211833298712054"

    frameborder="0"

    style="

    min-width: 100%;

    height:539px;

    border:none;"


    scrolling="no"

    >


    </iframe>

    Let us know if you need further assistance.

    Thanks

  • Profile Image
    Brooks_Rochelle
    Answered on July 05, 2021 at 01:44 AM
    Thank you for your response! All fixed this end! I appreciate your help
    with this matter :)
    Regards
    Rochelle
    ...