The code to know the URL where my submissions come from is not working correctly

  • Profile Image
    beatsahead
    Asked on September 10, 2013 at 09:24 AM

    ve this code, the forms are coming through fine but it#s not giving me the url, can anyone tell me where i'm going wrong please?

    One of the pages is http://www.beatsahead.com/london-dj-your-dj-in-london/



    This is a re-post of a comment on Capture the Page URL Where the Form is Embedded

  • Profile Image
    beatsahead
    Answered on September 10, 2013 at 10:45 AM

    Thanks, I just tried that script, but then the form does not show at all.

  • Profile Image
    beatsahead
    Answered on September 11, 2013 at 02:48 AM

    Thanks for looking into it, but that code doesn't show the form at all again.

  • Profile Image
    EltonCris
    Answered on September 11, 2013 at 03:07 AM

    @beatsahead 

    The code provided by my colleague works for me. You may try it again using the following embed code.

    <script type="text/javascript">document.write("<script type=\"text/javascript\" src=\"https://www.jotform.com/jsform/30435174568356?page=" + window.location.href + "\"></" + "script>");</script>

    Result would be like this. It copies the page URL into the hidden box on your form.

    Thanks!

  • Profile Image
    beatsahead
    Answered on September 11, 2013 at 08:33 AM

    I couldn't get that to show up, this works, and I get the url

    <script type="text/javascript">document.write(" <script src=\"http://form.jotform.com/jsform/30435174568356?page= " + window.location.href + " \"></ " + " script> ");</script>

    but nothing on the page below it shows, I can't see what the problem with the script is.

  • Profile Image
    pinoytech
    Answered on September 11, 2013 at 09:47 AM

    Hi,

    I think the issue is had something to do with your site's current doctype <!DOCTYPE html> which is the reason why scripts not functioning properly.

    Please change your website's doctype with this: http://pastie.org/5045575 and re-embed your form's code into your form again.

    <script type="text/javascript">document.write("<script type=\"text/javascript\" src=\"http://www.jotform.com/jsform/30435174568356?page=" + window.location.href + "\"></" + "script>");</script>

    Thank you!

  • Profile Image
    beatsahead
    Answered on September 11, 2013 at 01:43 PM

    Can you tell me where to put that, it's a wordpress site, I can edit the files, but I need to know which file to edit.

  • Profile Image
    beatsahead
    Answered on September 11, 2013 at 02:13 PM

    Thank you so much for all your help, I found the DOCTYPE in the header.php, and with the last script its all working well.

  • Profile Image
    pinoytech
    Answered on September 11, 2013 at 02:16 PM

    Hi,

    Good to hear that everything is working fine now. If you need our assistance again, feel free to contact us at anytime.

    Have a nice day!