Embed Jotform in SquareSpace web site

  • Profile Image
    hardingt12345
    Asked on February 14, 2017 at 03:19 AM

    I received Jotform advice to embed CSS code below into my code block in SSpace but I am not sure where exactly to place it as the embedded Jotform is still "floating more or less in the middle of the page ie not left aligned and with less space above it as desired.

    .form-all, form {
       margin-top: 0 !important;
       padding-top: 0 !important;
    }

     liyam 12/2/17

     

    SquareSpace copied in Jotform code at url I give below is :-

    <iframe id="JotFormIFrame-70352962461860" onload="window.parent.scrollTo(0,0)" allowtransparency="true" src="https://form.jotform.co/70352962461860" frameborder="0" style="width:100%; height:539px; border:none;" scrolling="no"> </iframe> <script type="text/javascript"> 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; } } </script>

     

    JPG attached shows SquareSpace form with embedded Jotform which I wish to align more to left and not so low on page. (Jotform padding settings in Form Design are as small as possible)

  • Profile Image
    Boris
    Answered on February 14, 2017 at 06:09 AM

    To add the CSS codes into your form, you would follow this guide:

    https://www.jotform.com/help/117-How-to-Inject-Custom-CSS-Codes

    I have checked the website you have linked to, and based on your descriptions and the image, your form already appears to have been positioned how you wanted:

    Please let us know if you need further assistance. Thank you.