How to find out the HTTP address of the page from which a submission came

Last Update: May 22, 2014

This guide is deprecated. We already have a widget that captures referrer URL/website address. It's very easy to use without a need of modifying your form source code. Get it here: http://widgets.jotform.com/widget/get_referrer

Let's say you have created a form and embedded it into several web pages. Is it possible to identify the page from which a particular submission originated? Absolutely!

Please follow these instructions carefully:

1) Open your form in the form builder
2) From the "Power Tools" accordion menu on the left, insert a hidden field (Hidden Box) into the form
3) Change the label of this newly inserted field to pageAddress and save the form
4) Copy the full source code of your form (Setup & Embed > Embed Form > Source)
5) There should be a line, similar to that below, right before the tag:



Note the value of the id on that line. (For this example it is input_5 but it may be different in your form.)

6) Paste the html source code of the form into your page and add the following lines right after the tag



NOTE: The ID in this script must match that noted in Step 5. In other words, if the line before the tag in your form's source is



you would need to change 'input_5' to 'input_7'.

An alternative method, using an iFrame


9 Comments...


   
saldellamonica (January 19, 2011 at 08:06 AM)

You can set the vale of the hidden field using the onSubmit event of the form...


   
Paul (January 27, 2011 at 04:31 PM)

Hi, quick question, can this be done with a lightbox??

Thanks in advance

Paul.


   
madmax1930 (May 20, 2011 at 01:36 PM)

What if the form is being used in a Facebook fan page?

View Answer


   
rabelardo (May 23, 2011 at 03:49 PM)

good day.

let's say i have the same id, where do i insert the sample script:


document.getElementById('input_5').value=location.href;


if i use the embed source code for joomla; such as this:



thanks.

View Answer


   
AndrewDavies (June 04, 2011 at 09:47 AM)

This is very useful information indeed. Thanks for posting it.


   
MuhammadEid (June 23, 2011 at 06:32 AM)

i want to know how to know from my visitor come thanks

View Answer


   
stanccone (June 20, 2012 at 04:44 PM)

Please help me with that...i try in diferent way but still nothing.
I use Wordpress...
How can I receive in my emails the page from where the form was sent?

Thanks in advance!

View Answer


   
bhpinfo (October 09, 2012 at 11:28 AM)

I am still struggling with this one. Other methods, using embed code don't work for me, so I gave this method a go.

It saved the form fine for a change, but it lost all of the nice formatting and converted it to plain bulleted list etc.

How do I fix that?

View Answer


   
richsmithphoto (April 27, 2013 at 04:43 PM)

Can this technique be used with the Wordpress plugin? That's the only way I can get the forms to work. It seems to strip out scripts.

View Answer


Send Comment