I’m wondering how I can pass URL parameters into hidden form fields. Let’s say that…
-I’ve created a form with an ID of ‘
-The form has a hidden field with an ID of ‘ #hidden’ that I want to pre-populate with the value of utm_source.
-The URL is ‘ website.com?utm_source=blue’
Thanks in advance!
I’m actually building something for this exact problem at
In additional to auto filling form elements via url parameters, you can also personalize any part of your page with those same url parameters… I’ve been using Script to level up my no-code mastery, it’s enabled me to create some pretty cool stuff, you should definitely go check it out!
Take care my friend,
Hmm, your link is dead. Is your auto-fill script no longer a thing? I’d love to see how it’s done and have read other posts on it with no luck.
This solution works with hidden fields as well.
Note that in Webflow you’ll create the
<input type="hidden"> element in an HTML Embed element.
Depends on specifically what you want to do, but this library extracts querystring params and can apply them to your Webflow elements in 3 ways;
All <a> links are modiied so that the href querystring is replaced with the querystring of the current page request, so that e.g. utm_ params are carried through.
Any <input> elements ( including hidden ones ) tagged with a custom attribute of wfu-query-param=X will have the value of that <input> element replaced with the param value of X.
Any other e…
Correct, no longer a thing!