Form is not submitting and only spins on WP site

  • hoelzer_m
    Asked on December 15, 2020 at 7:51 PM

    Hi there -

    This form is continuing to spin and not submit when filling it out: https://www.jenniferallenlaw.com/get-started-2/

    Do you all have any recommendations about what to do? What's baffling is that a form was submitted today, however, I got a notification from my client that the form had stopped working around 3pm. A form appears to have gone through after that. However, I'm testing the form right now and I can't get it to go anywhere after I finish filling it out and hit "submit." It just stays on "please wait" indefinitely and nothing happens.

    Suggestions?

    Jotform Thread 2768948 Screenshot
  • Vanessa_T
    Replied on December 15, 2020 at 10:50 PM

    It seems that the form's iframe is sandboxed.

    Please try to re-embed the form using iFrame Embed code alone.

    Getting-the-Form-iFrame-Code

  • Martha
    Replied on December 16, 2020 at 11:50 AM

    Hi there -

    So it was in an iframe before. This time I chose to use the wordpress code instead and put it on the page to test how that goes. Seems to be working again. Thank you for your help!

  • jallenlaw
    Replied on December 20, 2020 at 4:49 PM

    The form is still not working. It worked for several days with the wordpress code. Now it spins again. And I just changed the form with the iframe and it still spins. Please help.

  • jallenlaw
    Replied on December 20, 2020 at 4:50 PM
    1608501001 5fdfc709e30a2  Screenshot 10
    That was the error that was reported when it was in the wordpress format before I changed it back to iframe. Are there other settings I need to change?

    Thanks.
  • Vanessa_T
    Replied on December 20, 2020 at 9:24 PM

    Please add the iFrame Embed code below:

    <iframe id="JotFormIFrame-203255949499169" title="New Client Intake Form" onDISABLEDload="window.parent.scrollTo(0,0)" allowtransparency="true" allowfullscreen="true" allow="geolocation; microphone; camera" src="https://form.jotform.com/203255949499169" frameborder="0" style=" min-width: 100%; height:539px; border:none;" scrolling="no" sandbox="allow-forms allow-scripts allow-popups allow-same-origin allow-top-navigation"> </iframe>
  • jallenlaw
    Replied on December 21, 2020 at 10:57 AM

    So I'm testing it out now. I had to change your text to say "yes" to the scrolling or else the whole form doesn't show and only the top part of it shows, which doesn't allow the user to complete the form. So I just tested it.

    Now it submits (hoping this continues to work and doesn't start to fail again like it has done now twice previously), but now have another question.

    I submitted it. I go to view the test submission. I enabled the private key, however when I go to view the submission, there's no where to upload the key to view. So how am I supposed to view it? Also, there's a way to remove the key with a button up on top, which is great, but also seems like it defeats the purpose of having a key if you were to just click that.
  • Ashwin JotForm Support
    Replied on December 21, 2020 at 11:26 AM

    I am glad to know that you were able to submit embedded form successfully.

    I have moved your second question to a new thread so that we can address it separately. You will be answered in the following thread: https://www.jotform.com/answers/2779119


  • jallenlaw
    Replied on December 30, 2020 at 3:48 PM

    And we are back to square one with the form just spinning again and not submitting. Suggestions?

    Thanks.

  • Elton Support Team Lead
    Replied on December 30, 2020 at 9:43 PM

    Is this still the form in question https://www.jenniferallenlaw.com/get-started-2/? If yes, I checked the embedded iframe code and it still missing some values on the sandbox attribute which are needed for the form inside the frame to work. Without those, your WP site would continue to block the form from being submitted.

    Could you please take your full iframe embed code again and re-embed it to your WP website? The default iframe embed code with the script shouldn't have any problem. Make sure to paste the iframe code within the Text tab on your WP post/page editor. For as long as you do not modify your iframe embed code, this should continue to work fine. Example:

    wordpress embed iframe code Screenshot 10

    If that doesn't work, use the following code my colleague has provided with the script. Please do not omit the script unless you prefer your viewing the embedded form with a scrollbar. The script part is necessary for the frame height to dynamically change when your form length changes especially when using the form collapse.

    <iframe id="JotFormIFrame-203255949499169" title="New Client Intake Form" onload="window.parent.scrollTo(0,0)" allowtransparency="true" allowfullscreen="true" allow="geolocation; microphone; camera" src="https://form.jotform.com/203255949499169" frameborder="0" style="min-width: 100%;min-height: 4000px;border:none;" scrolling="no" sandbox="allow-forms allow-scripts allow-popups allow-same-origin allow-top-navigation"> </iframe>
    <script type="text/javascript"> var ifr = document.getElementById("JotFormIFrame-203255949499169"); 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": 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}), "*"); } }; if (window.addEventListener) { window.addEventListener("message", handleIFrameMessage, false); } else if (window.attachEvent) { window.attachEvent("onmessage", handleIFrameMessage); } </script>
  • jallenlaw
    Replied on January 5, 2021 at 6:34 PM

    So, I copied what you suggested for the first item. And it worked until yesterday when I received word that it had stopped working again. I've now moved on to using the text in the black box with hoping this lasts longer than a few days. Stay tuned.

  • Elton Support Team Lead
    Replied on January 5, 2021 at 8:33 PM

    We're sure the iframe should work. If you encounter the same problem again, make sure to let us know the page URL where the new iframe embed code is embedded so we can help.

  • jallenlaw
    Replied on January 11, 2021 at 6:53 PM

    And it's stopped working yet again with the code that I copied/pasted from the black box of code you shared before. The webpage is the same as I shared at the beginning of this thread.

    This form is continuing to spin and not submit when filling it out: https://www.jenniferallenlaw.com/get-started-2/

    I'm beginning to wonder if there is a plugin that's maybe causing an issue? or is it your code? Not sure.

  • Elton Support Team Lead
    Replied on January 11, 2021 at 8:24 PM

    We inspected the source code of the page and you're actually still using the default embed code, not the iframe embed code we provided.

    01122021 ZZblF0bKOK Screenshot 10

    Please update your embed code again with the ones we've provided, it doesn't use the oembed version and it has proper sandbox permissions that we've added.

    The embedded form also has a pretty limited height, it should suppose to expand when you use the full iframe embed code.

    01122021 PGU9Ys4CmO Screenshot 21

  • jallenlaw
    Replied on January 11, 2021 at 8:28 PM

    I admit I'm baffled. I literally took every piece of code that was in the black box. Hit copy and then pasted it into the website. And I even deleted out every piece of code from the page. I'm almost tempted to see if I could do a zoom call with one of you to watch to see if there's something I'm missing. Actually, is that possible to do a zoom call?


    Okay, I think I figured it out. I have two pages with the form on it. And I gave you the link for the other form, which had the old code on it. The other form I had updated (which when I went to paste this in again was the exact code you'd given before) and had forgotten that this form lived on two pages, so that helped. I should just delete this so on there's only one form on the site as not to have this happen again. So, hopefully this solved it. Am so glad you pointed out the code with that line because that was what nailed it for me when I went back to paste it. Thank you!! Hopefully this has solved it.

  • Elton Support Team Lead
    Replied on January 11, 2021 at 9:50 PM

    That's great! :) Everything looks good now when I check the embedded form. If you don't mind, can we make an actual submission on your embedded form to test it? We'd like to see for ourselves if it would go through.

  • jallenlaw
    Replied on January 11, 2021 at 10:18 PM

    Sure! Totally fine to test it out. I submitted a test and it looks like it went through. And now this explains why I had some submissions showing up in the inbox. But then I could test the link of /getstarted-2 and then have it not submit. So getting mixed results in the last couple of weeks was super puzzling to me. But, if there were two forms being submitted, that now makes tons of sense as to why some went through and some didn't. I deleted out the other page (with the link I hadn't given you, but had updated the form there) and made sure that in the spots where that form used to live that everything was pointing to the form I gave you.

    So, in theory, you should be able to go to https://www.jenniferallenlaw.com/ and then off of the home page click the "get help right away menu link" and go to https://www.jenniferallenlaw.com/get-started-2/ And hopefully this now fixes everything. Really can't thank you enough for pasting that line of code with the url. That was the trigger.

  • Vanessa_T
    Replied on January 11, 2021 at 11:33 PM

    I clicked the Get Help Right Away link from your home page and filled out your form and was able to submit just fine.

    1610425970 5ffd26727f3fb a Screenshot 10 I can also confirm that the embed code is correct and that there are no console errors on your page so your form should be fine.

    Do let us know if you need further help.

  • jallenlaw
    Replied on January 22, 2021 at 7:13 PM

    Hi -

    So, now I need to change out the form that is in the code that is currently working on the website. So, I duplicated the form (needed to remove some fields and add some new ones), and this is the form I now need to have embedded on the site instead - Agreement of Representation &amp; Waiver Form (NEW - Jan. 2021).

    This is the code currently on the site that is working and I thought maybe I could just switch out the url for the form to swap out to the newer form, but really do not want to break anything since it's working. This is the url for the new form: https://form.jotform.com/210217316701139. So do I need to just swap out that url for the url below or anything else? Oh, I guess the title has now changed too.


    OLD FORM CODE (that is currently working)

    <iframe id="JotFormIFrame-203255949499169" title="New Client Intake Form" onDISABLEDload="window.parent.scrollTo(0,0)" allowtransparency="true" allowfullscreen="true" allow="geolocation; microphone; camera" src="https://form.jotform.com/203255949499169" frameborder="0" style="min-width: 100%;min-height: 4000px;border:none;" scrolling="no" sandbox="allow-forms allow-scripts allow-popups allow-same-origin allow-top-navigation"> </iframe>

    <script type="text/javascript"> var ifr = document.getElementById("JotFormIFrame-203255949499169"); 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": 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}), "*"); } }; if (window.addEventListener) { window.addEventListener("message", handleIFrameMessage, false); } else if (window.attachEvent) { window.attachEvent("onmessage", handleIFrameMessage); } </script>

  • Elton Support Team Lead
    Replied on January 22, 2021 at 9:36 PM

    You can use the same code and just replace every form ID 203255949499169 with the new form ID 210217316701139. You can change the iframe title too.

    Example:

    <iframe id="JotFormIFrame-210217316701139" title="Agreement of Representation & Waiver Form" onDISABLEDload="window.parent.scrollTo(0,0)" allowtransparency="true" allowfullscreen="true" allow="geolocation; microphone; camera" src="https://form.jotform.com/210217316701139" frameborder="0" style="min-width: 100%;min-height: 4000px;border:none;" scrolling="no" sandbox="allow-forms allow-scripts allow-popups allow-same-origin allow-top-navigation"> </iframe>

    <script type="text/javascript"> var ifr = document.getElementById("JotFormIFrame-210217316701139"); 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": 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}), "*"); } }; if (window.addEventListener) { window.addEventListener("message", handleIFrameMessage, false); } else if (window.attachEvent) { window.attachEvent("onmessage", handleIFrameMessage); } </script>

    That's it! :)

  • jallenlaw
    Replied on January 23, 2021 at 11:09 AM

    Thanks! Good to know if I need to update it again or change forms. In the interim have copied/pasted your code into the page. Thanks again!


  • jallenlaw
    Replied on February 12, 2021 at 8:53 AM

    The form has stopped working again. The only change that has occurred that we upgraded to the first tier of paid access in the last week. I have not modified the form since we last spoke. The only difference that I know of that may have happened is at the bottom of the form would’ve had the Jotform logo removed. Any thoughts about what to do to resolve it? Thanks.

  • Cecile JotForm Support
    Replied on February 12, 2021 at 9:27 AM

    Hello there,

    Is the issue still the same - form not submitting?

    If so, I have cleared your form cache. Could you please check whether it resolved the problem? If not, may we ask permission to submit directly to your form so that we could investigate further?

    Looking forward to your reply.

  • jallenlaw
    Replied on February 12, 2021 at 2:08 PM

    Yes, I just tested the form and it took my data, and I was able to see it on the backend afterwards, so it looks like it is working again correctly. However, if it starts to do it again, I'll definitely see if you all can see the form, perhaps on the backend so we can test what is happening? Thanks. But happily working again for now.

  • Cecile JotForm Support
    Replied on February 12, 2021 at 3:19 PM

    Thank you for the update.

    We're glad to hear that it's working again.

    Please do not hesitate to contact us again if some issues arise.

    Best,