# Getting the form page url in the form results

**URL:** <https://forum.mautic.org/t/getting-the-form-page-url-in-the-form-results/23729>\
**Category:** Product Support\
**Created:** [April 13, 2022, 11:29am UTC](https://forum.mautic.org/t/getting-the-form-page-url-in-the-form-results/23729 "2022-04-13T11:29:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yochay11](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/yochay11/32/7301_2.png) [@yochay11](https://forum.mautic.org/u/yochay11)\
**Post date:** [April 13, 2022, 11:29am UTC](https://forum.mautic.org/t/getting-the-form-page-url-in-the-form-results/23729/1 "2022-04-13T11:29:10Z")

</div>

Hey hope you doing well,

I have created a form in mautic and i try to save the url of the form as i put them on different sites and different pages on each site.

I found that this page that explain how to do that:

> **[How to Save the Referring Page in a Form - Mautic](https://mautic.com/help/save-referring-page-form/)**
>
> It's often very helpful to know where someone has come from when they fill out a form on your website. In this tutorial, you'll learn how to embed and populate a hidden field with the referring URL for any form you choose.

It seems like that tutorial is a bit old, the way to do it is a bit messy when you create a lot of forms and if i use the form more than once on the page it seems like it doesn’t work well and i wasn’t able to find a way to make it work via the form.

Isn’t there a simpler way to get the form page url and the domain url on the form submission?

It seems like it’s one of the most important data and it seems like mautic store that data on the form event in the user so i thought i will check if there is better way?

Thanks

---

<div class="post-metadata">

**Author:** ![yochay11](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/yochay11/32/7301_2.png) [@yochay11](https://forum.mautic.org/u/yochay11)\
**Post date:** [April 13, 2022, 11:55am UTC](https://forum.mautic.org/t/getting-the-form-page-url-in-the-form-results/23729/2 "2022-04-13T11:55:27Z")

</div>

At the moment the best way i found to deal with that is by adding mautic\_refferring\_page and using this code with the form (works for more than one form at the same page)

If anyone know a better way to do that using the system please share it

```auto
<script>
var mautic_refferring_page = document.getElementsByClassName('mautic_refferring_page');
for (var i = 0; i < mautic_refferring_page.length; ++i) {
    var item = mautic_refferring_page[i];  
    item.value = document.URL;
}
</script>

```
