New line added after cursor leaves required field.

  • Profile Image
    chloe3415
    Asked on October 19, 2016 at 10:39 PM

    Another line at the bottom of the form seems to be added every time the cursor leaves a required input field.

     

    Thanks,

    Chloe

  • Profile Image
    seth
    Answered on October 20, 2016 at 07:12 AM

    Hello, You need to delete some scripts from your embedded code for your form to work properly. I am preparing a demonstration on which code you need to delete. Also you may want to change Iframe height according to your needs after deleting specified scripts.

    If you have any further questions please feel free to contact us.

    Cheers.

  • Profile Image
    seth
    Answered on October 20, 2016 at 07:33 AM

    In order to avoid the problem you need to delete some scripting from your page. Here is a screen shot of what you should delete:

    Also here it is working on inspection mode of Chrome:

    Here is the code:

     """" window.handleIFrameMessage = function(e) { var args = e.data.split(":"); var iframe = false; if (args.length > 2) { iframe = document.getElementById("JotFormIFrame-" + args[2]); } 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; } 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}), "*"); } }; if (window.addEventListener) { window.addEventListener("message", handleIFrameMessage, false); } else if (window.attachEvent) { window.attachEvent("onmessage", handleIFrameMessage); } if(window.location.href && window.location.href.indexOf("?") > -1) { var ifr = false; if (args.length > 2) { ifr = document.getElementById("JotFormIFrame-" + args[2]); } else { ifr = document.getElementById("JotFormIFrame"); } var get = window.location.href.substr(window.location.href.indexOf("?") + 1); if(ifr && get.length > 0) { var src = ifr.src; src = src.indexOf("?") > -1 ? src + "&" + get : src + "?" + get; ifr.src = src; } } """"

    I hope this answer help.

    Cheers.

  • Profile Image
    chloe3415
    Answered on October 20, 2016 at 10:10 PM

    Great! Thanks!