Can you make the Referral URL visible on the form

  • dmcfeet
    Asked on January 13, 2015 at 2:18 PM

    When someone comes to my site, I would like to capture and display the URL where they clicked.  I think the referrer widget will capture the URL, but it does not display.

  • Ben
    Replied on January 13, 2015 at 3:16 PM

    Hi,

    The referrer widget will actually only show you the location from where the jotform was submitted, not from where the people came to your website.

    To do that you would need to capture this info on your website and then pass it to the jotform to some field - which would in turn show it on your jotform.

    Example would be through the $_SERVER['HTTP_REFERER'].

    You can see more on this here: http://stackoverflow.com/questions/16374704/php-how-to-get-referrer-url

    Best Regards,
    Ben

  • dmcfeet
    Replied on January 13, 2015 at 3:42 PM

    OK.  So this seems like all I need to understand is the syntax.  Can you help with that?

    Lets say that my form is

    1) http://form.jotform.us/form/50047823169153

    2) and the field I want to fill is called "website"

    What do I do next? 

     

  • Mike
    Replied on January 13, 2015 at 4:53 PM

    To be able to use the $_SERVER['HTTP_REFERER'] you will need a form source code, and a PHP enabled web server to host the form and referrer script. There is no way to inject the code directly via the form builder. Do you use the PHP on your website?

  • dmcfeet
    Replied on January 13, 2015 at 5:06 PM

    First of all this form will be embedded at Weebly. 

    I have pasted the source code into weebly, so that is set.

    Now what?

    Just in case you care, this is my test page http://http://www.editmob.com/jot/.  the form on the left is a weebly form the one on the right is yours.  The main reason I am thinking about switching is to get this feature.

  • Ben
    Replied on January 13, 2015 at 5:20 PM

    Hi,

    I am trying to find a guide or anything in their support docs, but I am coming up short. Please contact them and check with them if there is any way that their system would let you pass the $_SERVER['HTTP_REFERER'] info into your code.

    Once you know how to capture this info on your pages, please let us know and we would be more than happy to help you set it all up.

    If they can not provide you with this info, then I am afraid that there is not much that we can do in regards to this info.

    Best Regards,
    Ben