Jump to content
X2Community Forums

[Solved] How can I get the url from aWeb form lead

Recommended Posts

I am using a single form on a couple of contact us pages.

Is there a way to get the url that the form was filed in at, from the various url's that it is used?


It's important for me to know the url origin of a lead using the same form used on different pages.


I've been wrecking my brain with this.


I know you can create separate forms and use tags, but this application won't work. I'm looking to use one form on various locations on my site, but somehow need to get the url info of where the lead completed it, in order to respond accordingly.


I hope someone can help.

Link to post
Share on other sites

Hello Eugene,


Ah yes, makes sense. One way to do so would be to add a new custom field to your form to store their source URL, then add some custom JavaScript to capture the referrer (the page the weblead form iframe was loaded on) in the source URL field. You'll also want to insert some custom CSS to hide the source URL field on the form so as to not confuse the user. Please see the following screenshot for an example weblead form configuration, assuming this new URL field is called "sourceUrl":





  • Like 1
Link to post
Share on other sites

Awesome Ray, it works fantastic,



The value of this little feature is using one web-form on various products on an online shop where customers can ask product specific questions per product. Because you know where the question originated from, you can answer for that specific product. Using this field in your user notification email you can notify yourself quickly to help a customer. I also use a eMail-to-SMS server to send me SMS notifications and this little field info makes the world of difference.


You guys rock!

  • Like 2
Link to post
Share on other sites
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...