Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Pass the Page Title (or Slug) into a Hidden Field in a form



Site URL: https://jontyhurwitz.com

I have an enquiry form in the site footer.

When I get the enquiry through, I have no way of know which page it was submitted from.

I have created a hidden field in the form, and would like to pass the Page Title or the slug into this hidden form field.

You can see in this image, its the variable SQF_SLUG that I'd like to fill with the Page Title or the Page Slug.

Is it possible?  I can't find a way




Link to post
  • Answers 2
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

Posted Images

2 answers to this question

Recommended Posts

  • 0

When tracking forms from different sources it is worth noting that you may have better transparency tracking origins through the use of separate forms each with their own unique name (i.e. Facebook Offer Form, Google Offer Form, etc.) Additionally you could consider sending the submissions from each form to a separate storage destination.

To specifically answer your question however using the hidden fields you will need to update the URL slug you want to track by adding the tracking code to the end of the slug.


There is a full article on how to implement this feature on available from Squarespace at https://support.squarespace.com/hc/en-us/articles/206543997-Tracking-Form-Block-referral-sources.

Link to post
  • 0

Thanks MoltoBello, yea I read that article, but that extracts from the URL.

In this case I'm not looking for the referrer.... I need the actual whole URL (or slug) of the page in the variable.

It seems to me there might be a way to do it by setting SQF_SLUG  variable in a code block.


SQF_SLUG = {Page-Title}


.... something like that.

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

  • Create New...