-
ballard991Asked on June 9, 2020 at 3:22 PM
Hi, I am trying to drop in my custom code into a squarespace page. I have worked out how to add it to the header of a page, but to add it to a body part of a page, I am adding it via the code injector. But, when adding the code, the booking form is not displaying fully. Image attached. Any ideas how i get the booking form to display fully?
-
Jimmy_DReplied on June 9, 2020 at 8:17 PM
Our apologies for the inconvenience. You might need to change the height of the iFrame to fix the issue. So we can help you better, can you please share with us the URL of the page where the form is embedded?
We look forward to your response
-
ballard991Replied on June 10, 2020 at 2:19 AM
Thanks for your help. Yes, i think it is the iFrame. The link is below, password is ITFC
https://www.leperchoirfrance.com/availability
It is the bottom form, ignore the top - was just trying it somewhere else.
-
Ariel JotForm SupportReplied on June 10, 2020 at 4:33 AM
Hello there,
Thank you for your message.
This is caused by two iframes sharing the same ID. To fix this, find and replace JotFormIFrame, highlighted on the code below, with JotFormIFrame2 on your 2nd iframe embed code.
<iframe
id="JotFormIFrame-201401262109338"
title="Hotel Booking Form"
onDISABLEDload="window.parent.scrollTo(0,0)"
allowtransparency="true"
allowfullscreen="true"
allow="geolocation; microphone; camera"
src="https://form.jotform.com/201401262109338"
frameborder="0"
style="
min-width: 100%;
height:539px;
border:none;"
scrolling="no"
>
</iframe>
<script type="text/javascript">
var ifr = document.getElementById("JotFormIFrame-201401262109338");
if(window.location.href && window.location.href.indexOf("?") > -1) {
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;
}
}
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; }
// the rest of the code...
Please give it a go and let us know how it goes. -
ballard991Replied on June 10, 2020 at 5:59 AM
-
roneetReplied on June 10, 2020 at 9:04 AM
I have moved the next concern to this ticket to avoid confusion:
https://www.jotform.com/answers/2379940
Thanks.