I’d like to redirect a user to an external website with a query string after their entered a value in an input element, I don’t find how this should be done.
It’s pretty easy with javascript but you would need to share your site for someone to actually write the code. Essentially you just prevent the default action on the button, grab the value from the input, append it to the variable with the url string, and then direct the user to the final url.
Say you want the form to collect name and email, and post them to another URL in this format;
https://somesite.com?name=XXX&email=XXX
You’d want to;
Create your form in Webflow
Add your name field and give it a name of name
Add your email field and give it a name of email
Set the form method to GET
Set the form action to https://somesite.com
When you submit the form, the browser will automatically recognize you are wanting to transmit the data in a querystring format, and will create the URL.
Important, the user will also be forwarded to that page, which means that the server you’re sending them to will be responsible to show the thank you message or whatever.
The only thing is that now this data saves as a form submission, which isn’t necessary. Is there a way to just redirect the user without saving the response in webflow dashboard?