How to Know the Exact URL of a Page From Which a Submission Came

Last Update: March 12, 2016

This guide is deprecated. There's no need to follow the steps below. We have a widget that captures website URL where the form is embedded. Check this out http://widgets.jotform.com/widget/get_form_page_url 


1.  Insert a hidden box to your form, name it to something like "referrer" or "website". Hidden box can be found under Widgets.

2.  Get your form's iframe or short embed (script) code. Choose only one.

IFRAME

<iframe allowtransparency="true" src="//form.jotform.com/form/12052837062" frameborder="0" style="width:100%; height:550px; border:none;" scrolling="no">
</iframe>


EMBED <>

<script src="//form.jotform.com/jsform/12340640557"></script>

 

3.  Split the embed codes into three parts using the guide below:

IFRAME

<iframe allowtransparency="true" src="//form.jotform.com/form/12340640557" frameborder="0" style="width:100%; height:529px; border:none;" scrolling="no"></iframe>


EMBED <>

<script src="//form.jotform.com/jsform/12340640557"></script>

 

4.  Insert a backslash in front of each double quote

IFRAME

<iframe allowtransparency=\"true\" src=\"http://form.jotform.com/form/12340640557\" frameborder=\"0\" style=\"width:100%; height:529px; border:none;\" scrolling=\"no\"></iframe>

 

EMBED <>

<script src=\"http://form.jotform.com/jsform/12340640557\"></script>


4.  Append ?referrer= after your form ID (if your hidden box name is referrer). However, if your hidden box name is website then append ?website=  .To make this short, this URL parameter depends on your hidden box name. 

In this example we'll use ?referrer= since our hidden box name is referrer.

IFRAME

<iframe allowtransparency=\"true\" src=\"http://form.jotform.com/form/12340640557?referrer=\" frameborder=\"0\" style=\"width:100%; height:529px; border:none;\" scrolling=\"no\"></iframe>

 

EMBED <>

<script src=\"http://form.jotform.com/jsform/12340640557?referrer=\"></script>


5.  Copy the sliced codes onto the JavaScript code below (be careful not to miss the double quotes):

<script type="text/javascript">
document.write("PART 1 GOES HERE" + window.location.href +
 "PART 2 GOES HERE" + "PART 3 GOES HERE");</script>

So it becomes:

IFRAME

<script type="text/javascript">
document.write("
<iframe allowtransparency=\"true\" src=\"http://form.jotform.com/form/12340640557
?referrer=" + window.location.href + "\" frameborder=\"0\" style=\"width:100%; height:529px; border:none;\" scrolling=\"no\"></" + "iframe>");</script>


EMBED <>

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


6.  Embed the edited codes onto your pages.

The URL of the page where the form is submitted will be stored in a hidden field which will be displayed in your form's  email alerts and submissions page.

If you have questions regarding this user guide, feel free to post your comments or head over to our support forums.


27 Comments...


   
Debbie (August 23, 2011 at 09:12 PM)

I was wondering if jotforms could be used to upload something like a picture and some sentences onto a page in my website instead of sending me an email.

View Answer


   
webadmin (September 09, 2011 at 01:03 PM)

I have a questions form which I use on two different websites. On the first site the form works well.

On the second site, the form reports the page URL of the first site.

I have tried clearing cookies, but that did not help either.

What to do to get accurate URL reporting?

View Answer


   
shopmfp (February 16, 2012 at 11:10 AM)

why is this not working on my website:


document.write("");

View Answer


   
wbclsurvey (March 02, 2012 at 07:29 PM)

Is there any way to get this concept to work with using the source code rather than an iframe or the embed code?

View Answer


   
etobic (April 10, 2012 at 05:16 AM)

can you explain in more details the "1. Insert a hidden box to your form, name it to something like "referrer" or "website""

I did it all according this tutorial and I'm still getting only "referrer" text in my form received instead of link

View Answer


   
etobic (April 10, 2012 at 06:07 AM)

ups - one more time

form: http://awesomescreenshot.com/04035vj5b

code: http://awesomescreenshot.com/03835vt9a

what am I doing wrong ?

View Answer


   
brycelw (July 02, 2012 at 05:07 PM)

My RAW short embed code works perfect with my site. Now I need to track the specific URL where a submission came from. I am confused because my short embed for my form is already a javaScript code. This is how it starts.

View Answer


   
handstellstories (August 12, 2012 at 12:50 PM)

I would like to do this, but would like to use the lightbox option. Is this possible?

View Answer


   
handstellstories (August 13, 2012 at 04:05 PM)

Hi there,

Although I got this to work, I realize now it caused some problems w/ the website. I use shopify for my website. On every page that I added the form, as explained above, I can no longer see the price above the add to cart button.

Here is an example of a page without the form: http://www.handstellstories.com/collections/home-decor/products/tree-of-life

Here is an example of a page with the form: http://www.handstellstories.com/collections/home-decor/products/bird-pillow-shams

Any ideas?

View Answer


   
Aash (August 30, 2012 at 01:15 PM)

The problem is how will i be able to find out the i-frame code as i am working with Dreamweaver-CS3. I am not able to do this process as it is not working. plz help me out asap.

View Answer


   
vmgbpo (September 21, 2012 at 12:37 PM)

Hi, I followed the instructions but even my form is not getting displayed now.

here is default form code:





here is my the code with the changes I have made


document.write("
");

View Answer


   
maverickbankcard (October 05, 2012 at 05:35 PM)

Success!..after a day of tweaking. Note that there are “www’s” in the url instead of “form” and the hidden field name is case sensitive. I had Source_URL, but the field name is actually source_url. These subtleties are the difference between going to lunch...or not.


document.write("");


   
krp54 (November 21, 2012 at 06:54 AM)

Hi there,

Thank you for the script, but i can't get it working on my website. try clicking this button http://prntscr.com/k8ftt

on a webpage: http://krp54.ru/XT-120.html

Can you help please?

View Answer


   
guest_23266997080059 (December 12, 2012 at 01:08 PM)

Hey,

Not working on my blogger site with iframe:

http://www.homeinrio.com/2012/12/test-13.html

the whole form doesn't appear, looks like the document.write isn't wroking? Any thoughts?

Thanks,

KH

View Answer


   
DanielJGarvey (January 03, 2013 at 09:47 AM)

Brilliant!


   
aliaswave (January 12, 2013 at 03:03 PM)

This isn't working with wordpress.

I've tired both methods iframe and short code.

View Answer


   
guest_30085481901046 (January 28, 2013 at 12:20 PM)

For some reason I could not login, although I am a paying JotForm customer (ccdesign).

since document.write does not work well with XHTML, is there any other way to execute this in WordPress? When I use the embed code, my form works, but the page footer disappears. When I use the iframe code, my form isn't even there.

View Answer


   
guest_30085481901046 (January 28, 2013 at 01:12 PM)

Me again...I finally had to use the entire source code, but that took care of it.


   
mktngdept (February 07, 2013 at 05:34 PM)

THANK YOU!!!!! It took a little trial and error but in the end, I was just reading/understanding the instructions wrong. If you follow them exactly, it works.

View Answer


   
jordan8037310 (March 27, 2013 at 07:02 PM)

Is there anyway to integrate this functionality with WishBox? Currently messing around with the javascript to no avail.

View Answer


   
fradem (April 12, 2013 at 09:39 AM)

Can you make a field-type with this? (like the UNIQUE ID field)

Or just include this in all the answers just like you do with the IP?

I am sure it would be much appreciated.

View Answer


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

How would you use this with the Wordpress plugin? I have to use this because script gets messed up in my Wordpress install for some reason. I went into the plugin code and found this line:

return "";

But I wasn't brave enough to edit it. Javascript and PHP confuse me. Any help would be great!

View Answer


   
vmgbpo (May 08, 2013 at 07:26 AM)

This is not working on my website. Here is a example page

http://www.vmgmart.com/agro-shredder-machine/

I fill up that yellow form created with jotform but the referral URL is not getting captured.

Can some one please help me to make this work ?

Thank you.

View Answer


   
csmarketing (July 15, 2013 at 12:53 PM)

Hi,

This was working last week, but it's not working this morning on any of our forms.

View Answer


   
beatsahead (September 10, 2013 at 07:18 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?

document.write("");

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

View Answer


   
PriceIT (November 15, 2013 at 10:05 AM)

My forms not showing up anymore after I tried this.

Here's the code:
http://gyazo.com/094d1994b3b81f9601ba3edc751c073b

View Answer


   
priyo (May 24, 2015 at 03:29 AM)

Thx all.

website me
http://swalayanperak.com/custom-cincin-2


Send Comment