-
Picasso_ArtistsAsked on May 20, 2022 at 5:26 AM
Hello,
I have embedded the below form to my website on GoDaddy
form:
https://form.jotform.com/221391612785458
to
https://wearepicasso.com/painting11
Once form is filled the thank you page will not show, only if I scroll to the top of the page, this is on Mobile only
You may test it with fake cc
Use a card number, 4242 4242 4242 4242. Enter the card number in payment form.
- Use a valid future date, such as 12/34.
- Use any three-digit CVC (four digits for American Express cards).
- Use any value you like for other form fields.
-
John Support Team LeadReplied on May 20, 2022 at 5:51 AM
Hi there,
I was able to replicate it on both a desktop and mobile.
Could you please try embedding the form using iframe instead? Here's a guide on getting the form's iframe Code.
Please give it a try and see if it'll make any difference.
-
Picasso_ArtistsReplied on May 20, 2022 at 7:02 AM
I did use Iframe
<iframe
id="JotFormIFrame-221391612785458"
title="Payment Form"
onDISABLEDload="window.parent.scrollTo(0,0)"
allowtransparency="true"
allowfullscreen="true"
allow="geolocation; microphone; camera"
src="https://form.jotform.com/221391612785458"
frameborder="0"
style="
min-width: 100%;
height:539px;
border:none;"
scrolling="no"
>
</iframe>
<script type="text/javascript">
var ifr = document.getElementById("JotFormIFrame-221391612785458");
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>
However it still doesn't load to the top, I had to go to the Thank you page and pressed Enter about 10 times to move the "Thank You" to the very bottom so people see it once they complete the form, that's not very useable.
do you have any solution?
-
Camila JotForm SupportReplied on May 20, 2022 at 8:49 AM
Hello Picasso_Artists,
Thank you for using Jotform. I cloned your form and tested it to see if I could replicate the issue, but everything was working properly. Check out the screencast below to see my results: Thus, could you please try to remove and add again the iframe code. I also cleared your form cache. If this not working on your end again, please try to use the full source code. We also have a guide about How to Get the Full Source Code of Your Form that you can check out.
Give it a try and let us know how it goes.