Wordpress URL parameters

  • Profile Image
    serivzimarketingitalia
    Asked on January 23, 2017 at 12:28 PM
    Hi. I have insert code in section of template, but i have a problem.

    I need that 

    src="https://form.jotformeu.com/70194560165354?refId=1000"


    1000 it's dynamic from a short code or get url parameters

    i have try 

    src="https://form.jotformeu.com/70194560165354?refId=" [display-get-param name="subid"]

    also

    src="https://form.jotformeu.com/70194560165354?refId=" <? echo $_GET['subid']; ?>

    But don't work, can you help me?

    SCRIPT

    <iframe id="JotFormIFrame-70194560165354" onload="window.parent.scrollTo(0,0)" allowtransparency="true" src="https://form.jotformeu.com/70194560165354?refId=1000"
    frameborder="0" style="width:100%; height:539px; border:none;" scrolling="no"> </iframe> <script type="text/javascript"> window.handleIFrameMessage = function(e) { var args = e.data.split(":"); var iframe = false; if (args.length > 2) { iframe = document.getElementById("JotFormIFrame-" + args[2]); } 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; } 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); } if(window.location.href && window.location.href.indexOf("?") > -1) { var ifr = false; if (args.length > 2) { ifr = document.getElementById("JotFormIFrame-" + args[2]); } else { ifr = document.getElementById("JotFormIFrame"); } 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; } } </script>
    How would you rate your overall experience with Elegant Themes and the individual support given in this ticket?
  • Profile Image
    Nik_C
    Answered on January 23, 2017 at 02:13 PM

    Hello,

    If the name of the other field, the field which value you want to place in refId, is subid, then you can try with this URL:  src="https://form.jotformeu.com/70194560165354?refId={subid}

    If it doesn't work, please give us more information about the field, where is it and what is the ID/name so we can see if it is possible to do that.

    Thank you!