Closed Message Not Displaying in Wordpress

  • sarasjcc
    Asked on September 22, 2015 at 3:15 PM

    Hi, 

    We had an event this weekend and set the form to close at a specific time. The form closed, but did not display the closed message on our website. 

    I've been using the Wordpress embed code which seems to give us the best display on our website. But this problem has happened multiple times. Am I doing something wrong when setting up the form or embedding it? Or does this feature just not work with the Wordpress embed?

    Thanks!

  • BJoanna
    Replied on September 22, 2015 at 4:30 PM

    When I inspected your website I noticed that closed message is not displaying. 

    Please try to embed your form with iFrame code to see if that will resolve your issue. Inside of this guide you can find out how to get a form iFrame code:

    https://www.jotform.com/help/148-Getting-the-Form-iFrame-Code 

    Hope this will help. Let us know if you need further assistance. 

  • sarasjcc
    Replied on September 22, 2015 at 6:10 PM

    Thanks for your help. When I embed the iframe it does show the closed message, but it also puts huge gray boxes both above and below it. Is there a way to avoid that, because as is, that definitely doesn't work. Thanks!

     

     

  • Chriistian Jotform Support
    Replied on September 23, 2015 at 12:15 AM

    Hi,

     

    Can you try to remove the script tag in the iFrame embed code of your form and adjust the height manually? 

    Remove this tag in your iFrame code:

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

     

     

    Manually adjust the height or you can use the iFrame code below:

    <iframe id="JotFormIFrame" onDISABLEDload="window.parent.scrollTo(0,0)" allowtransparency="true" src="https://secure.jotformpro.com/form/52155965137965" frameborder="0" style="width:100%; height:426px; border:none;" scrolling="no"></iframe>

     

    Do let us know if you need further assistance.
    Regards.

  • sarasjcc
    Replied on October 2, 2015 at 2:06 PM

    Well, that helps make the gray boxes smaller, but they're still there. If I adjust the height too small, it cuts off from the bottom, but doesn't affect the top gray box.

    If this is the only solution, does this mean I need to go in and delete that section of code and manually adjust the height on every single form I embed if I want it to be able to show the closed message?

  • BJoanna
    Replied on October 2, 2015 at 3:04 PM

    Unfortunately it is not possible change gray color of disabled form,because it is using the error styles from the server, not from the form.

    Possible workaround would be to create one additional form where you will only have one text field with your closed message. And then you can embed that form until your other form is closed.

    Something like this: http://form.jotformeu.com/form/52745986735371? 

    Hope this will help. Let us know if you need further assistance.