Thanks Sanford, super helpful
Sure thing!
Hey Sanford!
I wanted to ask, will this work to set a value based on the current URL they are on for the form? Not sure if thats the same thing as the referrer in this case.
Essentially I want to be able to do something like:
set Brand Name to Brand1 if URL contains /brand1 (i,e. https://www.website.com/brand1)
Thanks!
Edit: I think I found the answer in another one of your posts here (https://nation.marketo.com/t5/product-blogs/beautifying-fields-like-last-form-url-by-stripping-unint...
Guessing I can just replace document.referrer with document.location.href to achieve this then.
document.referrer
is the page before you navigated to the current page. document.location.href
is the current page.
Thank you Sanford! I just found this through another article of yours and had edited my comment, that works!