Thank you for your answer to this question, it is very helpful!
Question though, if I am looking to append more than one field to the end of my URL what changes would I make to the custom code? For example sake, say I wanted to append email, name, and phone number to the end of the URL below.
I would seriously not reccomend doing this since it may violate GDPR terms and you might get into serious trouble.
If you have users in the EU and happen to use any third party script that analyses URLs (like google analytics of facebook pixel, just to name very commonly used examples) you are serving pii (personal identifiable information) to that service, which is a very serious violation of GODR terms.
I don’t know what you want this for, but just thought I’d mention it for you to keep it in mind.
Fines for violating GDPR terms go up to 20 million euros.
I wound up using sessionStorage to achieve the outcome I was looking for.
It’s not best practice to store sensitive information in the browser like this and probably violates GDPR unless you disclose what you’re doing with the information. But I’m not passing along anything egregious in my case and at least storing it in the session clears it eventually (as opposed to localStorage). I also clear it after the form submission.
I preferred to use this on .submit() and use webflow’s default form behavior for redirects and response messages.
Thanks for the script, it’s perfectly working on Chrome, but the form is not submitted on Safari and Firefox (with message error, but the new link is well oppened). You can check on your demo.
Do you know how I can fix this issue ?
Thanks for your help.