pkram3r
-
Posts
2 -
Joined
-
Last visited
Reputation Activity
-
pkram3r got a reaction from Beyondspace in Contact form in footer, how to identify which page the form entry was completed on?
Thank you so much bangank36 that worked perfectly and exactly what I needed.
I've sent you a DM
-
pkram3r reacted to Beyondspace in Contact form in footer, how to identify which page the form entry was completed on?
⚠️ The script has been updated, kindly check the below reply for new Squarespace form blocks update on May 2023 ℹ️
1. You assign the name of the hidden field and choose edit to get its generated name for the form, in this case it is 'footer-pagepath' -> 'SQF_FOOTER_PAGEPATH' (make sure it is unique name)
2. Add this snippet into settings->advanced->code injection->footer
<script> document.addEventListener('DOMContentLoaded', function() { if (document.querySelector('[name="SQF_FOOTER_PAGEPATH"]')) { document.querySelector('[name="SQF_FOOTER_PAGEPATH"]').value = location.pathname; } }); </script>
-
pkram3r got a reaction from Beyondspace in Contact form in footer, how to identify which page the form entry was completed on?
Hi team,
I have a contact form in the footer of my website, so it appears on every page.
Each home I am selling has its own page, and the footer appears on each page.
When a user makes an enquiry I dont have an identifier to say what page the user was on when they submitted the form. The forms are coming through fine, but I'd love to have the URL it originated from.
Any help would be awesome. Thanks.