External site with query string

Hello Webflow Community,

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.

For instance : I type “hello world” in the input, then click on a button and I shall be redirected to https://mywebsite.com?q=hello%20world.

How can I achieve this ?


Here is my public share link: LINK
(how to access public share link)

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.

I know this post is years old by now, but I need help with the exact question above. I need the submit button to:

  • add input values to a query string
  • redirect the user to a URL with the query string

Can you help me with the javascript?

Geraldine you can do this with a native form.

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.

1 Like

Hi Michael, thanks this works great.

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?

Thanks again

Am I looking at the right form here?

Your action [1] looks good, and when you have an action set, Webflow has always ignored the form submission and let you control it independently.

However the part at [2] is brand new and a bit suspicious.

I haven’t seen any changes on my sites. You might contact support and check on that, and how to prevent forms from being processed by Webflow.