Get source page into Contact form
I added a Contact Form (Global) in all the products pages of my site.
I would like to know, reading the mail, the source page from where has been sent the Contact request.
I tried adding <script>document.write(window.location.href)</script> into the "USE CUSTOME TEMPLATE" field but is not working.
How to know the source page of the contact request in order to use a Global Contact Form for different pages?
Thank you
-
Hello Emanuele,
Natalia here! Thanks for your message.
You don't need to write a script code on the cloud page. There is an easy way:
In the contact form element, add a hidden field - https://jmp.sh/tbrjTN3; in this field add the page URL (in my case - https://lime4000535.brizy.site); The preview mode will not display this field - https://jmp.sh/Vr9rT5u
Therefore, in my notification emails (and in the leads tab) I will have the user email + the page from which he submitted this form - https://jmp.sh/Y22xiRk // https://jmp.sh/WPHjEv1 ;
Let me know if you have any other questions.
Regards, Natalia
0 -
Hi Natalia, thank you for your answer. AFAIK in this way I have to set the URL in each page.
I would like to use a global Contact Form, because I will need to use it in many pages.
If I apply a change into a global object it affect all the pages that link this global object. This is the reason I evaluated the script.
Regards,
Emanuele
0 -
Hi Emanuele,
Unfortunately, there is no way to display the page URL in the form settings and we can't help you with the code. I'm afraid the solution my colleague Natalia offered you is the only one available.
0
Please sign in to leave a comment.
Comments
3 comments