Embed form to Wordpress does not work

  • TriYoga
    Asked on July 28, 2014 at 4:46 PM
    I am trying to embed form into wordpress (used wp code, iframe) but it does not work, somehow my header appears before the form twice. I tried plugin with shortcode as well... still does not work
  • Mike_T Jotform Support
    Replied on July 28, 2014 at 4:59 PM

    Please provide us with a link to the Wordpress page with embedded form. In this way, we will be able to investigate it further.

    Thank you.

  • TriYoga
    Replied on August 3, 2014 at 1:14 AM

    Thanks for quick reply

    here is what happens

    http://triyoga.com/triyoga-internship-application/

     

    thank you!

  • Welvin Support Team Lead
    Replied on August 3, 2014 at 5:49 AM

    What is the current embed method on the page? Is it the default Javascript Method or the Embed Form Plugin? 

     

    If it's the default javascript method, the embed codes should be like this:

    <script type="text/javascript" src="//form.jotform.me/jsform/42084565345154"></script>

     

     If it's the embed form plugin, the codes should be like this:

    <script type="text/javascript" src="https://www.jotform.com/jsform/42084565345154?redirect=1"></script>

     

    The shortcodes of the form should be: [jotform id="42084565345154"]. You have to make sure that this shortcode is NOT inclose with other tags. And place it inside the Text Editor:

    Embed form to Wordpress does not work Image 1 Screenshot 20

    The current codes on the page is:

    <script src="//form.jotform.us/jsform/42084565345154"></script> 

    ...which I think an incorrect codes.

     

    Please kindly make sure to check and correct that.

    Thank you!

  • Welvin Support Team Lead
    Replied on August 3, 2014 at 5:52 AM

    Also, try the iFrame Method: http://www.jotform.com/help/148-Getting-the-Form-iFrame-Code, but without the script tags. For example, your iFrame codes are these:

    <iframe id="JotFormIFrame" onDISABLEDload="window.parent.scrollTo(0,0)" allowtransparency="true" src="//form.jotform.us/form/42084565345154" frameborder="0" style="width:100%; height:3595px; border:none;" scrolling="no"></iframe>

    <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;}};if (window.addEventListener) {window.addEventListener("message", handleIFrameMessage, false);} else if (window.attachEvent) {window.attachEvent("onmessage", handleIFrameMessage);}</script>

    You have to remove the codes highlighted with the Yellow color.

    Thanks

  • TriYoga
    Replied on August 3, 2014 at 11:41 AM
    Thanks a lot!
    I tried shortcode before and default embed, wp embed, got all of the plugin
    for jot forms - everything gave same result
    but your last answer with iframe when I deleted the line made it perfect.
    So I need to us iframe and delete this code on each form?
    thank you
    ...
  • Aytekin JotForm Founder
    Replied on August 3, 2014 at 2:12 PM

    If it causes problems you can delete the JavaScript part. All it does is to resize the iframe when a resize is needed on Multi-page forms or forms with conditions.

  • TriYoga
    Replied on August 3, 2014 at 2:21 PM
    Will deleting it effect the conditions if I have any?
    Does iframe works ok on mobile devices?

    thanks a lot!
    ...
  • KadeJM
    Replied on August 3, 2014 at 5:29 PM

    No, it should not. Your conditions are in your form but the files used to run it are separate from what was previously mentioned above.