How to Know Which Page or Form the Submission Came From

October 26, 2022

If your form is embedded onto multiple web pages, you can monitor where the entries are coming from by using a widget or a hidden field.

Note

This guide shows how to tag an embedded form’s submissions by prepopulating a hidden field. For the widget method, see Capturing the Page URL.

Here’s how to set it up:

  1. In Form Builder, add a Short Text element to your form.
    Label your field with something descriptive. For example, “source.”
  2. Click on the Short Text’s gear icon to open its Properties panel.
  3. Choose Advanced in the Properties panel on the right.
  4. Scroll down to the Hide field option and set it to “On.”
  5. Expand the Field Details section and copy the Short Text’s unique name.
form-builder-hidden-short-text-source-unique-id-min.png

You can now add a query string to your embed code’s or parent window’s URL to prepopulate the hidden field. For example, if your form is embedded on the contact page, you can append the field’s unique name and value to the embed code’s SRC attribute or the contact page’s URL.

Using the example above, the JavaScript embed code would look like the following:

<script type="text/javascript" src="https://form.jotform.com/jsform/1234567890?source=contact_page"></script>

Or, as follows if you’re using the iframe embed code:

<iframe
	id="JotFormIFrame-1234567890"
	title="Form "
	onload="window.parent.scrollTo(0,0)"
	allowtransparency="true"
	allowfullscreen="true"
	allow="geolocation; microphone; camera"
	src="https://form.jotform.com/1234567890?source=contact_page"
	frameborder="0"
	// the rest of the code...

For Feedback and Lightbox embed codes or when adding the query string to the embed code’s SRC attribute doesn’t work, you can add the query string to the parent window’s URL:

https://www.example.com/contact?source=contact_page

To learn more, see Prepopulating Fields to Your Jotform via URL Parameters.

Was this guide helpful?
Contact Support:

Our customer support team is available 24/7 and our average response time is between one to two hours.
Our team can be contacted via:

Support Forum: https://www.jotform.com/answers/

Contact Jotform Support: https://www.jotform.com/contact/

Send Comment:

Jotform Avatar
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Comments:

  • panziowebsite
  • marcomm
  • jeronsam
  • jamesgreaves
  • drakeladue
  • Istvan
  • hosker4u
  • carefreetees