# Getting page URL from form submission in wordpress:

**URL:** <https://forum.mautic.org/t/getting-page-url-from-form-submission-in-wordpress/2487>\
**Category:** General Discussion\
**Created:** [October 7, 2015, 10:19pm UTC](https://forum.mautic.org/t/getting-page-url-from-form-submission-in-wordpress/2487 "2015-10-07T22:19:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jaheki](https://avatars.discourse-cdn.com/v4/letter/j/c68b51/32.png) [@Jaheki](https://forum.mautic.org/u/Jaheki)\
**Post date:** [October 7, 2015, 10:19pm UTC](https://forum.mautic.org/t/getting-page-url-from-form-submission-in-wordpress/2487/1 "2015-10-07T22:19:13Z")

</div>

Getting page URL from form submission in wordpress:  
  
  
  
this came directly from Daniel in support, so he gets all the credit for this, but its so useful I had to share it!  
  
im using wordpress for my website and switching forms over to mautic, but I needed a way to identify which page form submissions were coming from, so here is the workaround:  
  
  
  
Step 1: if your site is using SLL (HTTPS) make sure you are creating forms on your https mautic instance  
  
Step2: add a hidden field into your form, specify the label as “URL”  
  
Step 3: add a send form results action  
  
Step 4: drag and drop URL field into text box  
  
Step 5:click on URL link and set the link to {formfield=”url”} save.  
  
Step 6: go to wp-content \>theme\>header.php and insert this snippet into header tag:

  
  
the specified email address you send this form result to will now receive a URL link showing them what page the form came from, very useful if you are working with lots of similar posts.

---

<div class="post-metadata">

**Author:** ![Jaheki](https://avatars.discourse-cdn.com/v4/letter/j/c68b51/32.png) [@Jaheki](https://forum.mautic.org/u/Jaheki)\
**Post date:** [October 7, 2015, 10:19pm UTC](https://forum.mautic.org/t/getting-page-url-from-form-submission-in-wordpress/2487/2 "2015-10-07T22:19:13Z")

</div>

Getting page URL from form submission in wordpress:

this came directly from Daniel in support, so he gets all the credit for this, but its so useful I had to share it!  
im using wordpress for my website and switching forms over to mautic, but I needed a way to identify which page form submissions were coming from, so here is the workaround:

Step 1: if your site is using SLL (HTTPS) make sure you are creating forms on your https mautic instance  
Step2: add a hidden field into your form, specify the label as “URL”  
Step 3: add a send form results action  
Step 4: drag and drop URL field into text box  
Step 5:click on URL link and set the link to {formfield=”url”} save.  
Step 6: go to wp-content \>theme\>header.php and insert this snippet into header tag:

the specified email address you send this form result to will now receive a URL link showing them what page the form came from, very useful if you are working with lots of similar posts.

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [October 8, 2015, 6:48am UTC](https://forum.mautic.org/t/getting-page-url-from-form-submission-in-wordpress/2487/3 "2015-10-08T06:48:25Z")

</div>

Thanks for sharing!

---

<div class="post-metadata">

**Author:** ![joelkiess](https://avatars.discourse-cdn.com/v4/letter/j/258eb7/32.png) [@joelkiess](https://forum.mautic.org/u/joelkiess)\
**Post date:** [July 20, 2016, 3:58pm UTC](https://forum.mautic.org/t/getting-page-url-from-form-submission-in-wordpress/2487/4 "2016-07-20T15:58:36Z")

</div>

This seems to be exactly what we need - to effectively replay to a inquiry from an inquiry via email we need to know what page the request came from. I’ve tried plug this in on our site but I cannot get a result. The form result email just has  
“{formfield=”url”}” in the body of the message where I would expect the url of the page it is sent from.

1. Where it says “putformnamehere” do I put the name of my form?  
2)My result email looks like this:

The URL is a field as you describe above.

Joel

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [February 2, 2020, 10:58pm UTC](https://forum.mautic.org/t/getting-page-url-from-form-submission-in-wordpress/2487/5 "2020-02-02T22:58:00Z")

</div>


