Form input on a URL as variables without completing the form but when a button is clicked

Hi,

Basically I try to have 2 dropdown lists in a form as an input, then use that to put on a URL as a variable as Example Domain

But the only problem is I don’t want to complete the form, because I don’t really need that info to be saved it is only to redirect the user to a new page and the form limit would be maxed out pretty fast. Would be great just to have a button that when it is clicked, it is just added to the URL the variables selected on the form.

Hi Anton,

If you share your read-only link I could take a look & get a better idea of what your trying to do. Are your trying to redirect a user to a set URL based on what they select from the 2 dropdowns?

Webflow supports this directly, no custom code needed;

  • Build your form using the standard Webflow form block.
  • Set your field names to list1 and list2.
  • Set the form method to GET
  • Set the form action to your target URL, e.g. https://www.example.com/

When someone does the selections and clicks submit, you’ll just see your target URL loaded with the form field data encoded on the querystring;

https://www.example.com/?list1=input1&list2=input2

The form submission won’t be handled by Webflows form submission handler because you have a custom action specified.

1 Like

wow thats exactly what I was looking for. Thanks!!

Didn’t know it was that easy, just couldn’t find it on the webflow documentation

Yeah it wouldn’t be, it’s not actually a Webflow feature, it’s just the way HTML forms work.
Fortunately Webflow exposes it well enough to access that functionality with just designer settings.

hi @memetican,

I’ve tried your solution but it don’t recall the input.

my redirect URL is to a typeform survey where I have a hidden field in the url.
www.typeformexampleurl.com?email=xxxx” and the “email=xxxx” is the hidden field that typeform is using to fill my answers in the survey.

In order to not ask twice the email (once in the webflow form, and once again in the typeform survey), I’d like to insert the input from my email field in my webflow form to replace the “xxxx” in my URL redirecting to typeform.

can you explain how I can do that ?

Looking forward to hear from you.

Best,
PYC.

Hi Pierre, this is exactly the same approach for you-

Make sure in your target URL you do not have the ?email= part, that will be added automatically by the browser as long as your method is GET and you have a form field named email.

Hey @memetican, tried this and it doesn’t work.

I’ve putted my url without the “#email=xxxx”, I have a form field named “email” and the URL just goes at with a “?typeform-source=www.cyberr.ai” added to it and not the email field input.

Am I doing something wrong ?

You need your url in the action of the form, not the redirect.
Also depending on your browser, you may not be able to have querystring params in the URL, you’ll have to factor those out into the form.

Lookup hidden fields if you’re unfamiliar with that.

@memetican, It works now but it seems that it doesn’t register the form in webflow anymore when I put the link in the action field… is that normal ?

Yes. That’s the scenario this thread is about.

If you’re trying to submit the form to Webflow’s handler and then redirect the user to another URL with some of that form data on the querystring, you can do that using custom code.