Streaming live at 10am (PST)

Change Form Redirect URL depending on option selected in form


#1

Hi,

I’m using a Webflow form to submit customer signup details to a Google Adwords agency. In this signup - the customer picks a monthly plan and a monthly spend. The form is submitted and the customer is redirected to an external subscription service where they submit their credit card details for payment.

The redirect to the external service needs to be dynamic - depending on their selection of plan and ad spend - it will redirect to a different subscription signup URL. I’ve been able to use javascript to change the form “redirect” url. However, even though the form redirect URL has been changed, it still redirects to the original form redirect URL i…e the redirect URL which was there when the page loaded. It seems that the redirect url which is specified on page load, is the URL which is used regardless of if it’s changed or not after page load.

Can anybody help with this or has anyone any other suggestions on how i can achieve this dynamic redirect?

I can change the form action dynamically using javascript so I was thinking about using an external form service and creating a separate form handler (i.e. a separate form action URL) for each option. However, this would mean making 20 separate form handlers so I’m slow to do this.

Any help or ideas would be greatly appreciated.


Can webflow pages receive a POST or GET variables?
#2

You’ll have to clear the Webflow form redirect field and custom code the redirect part.


#3

Ok. Any idea how to custom code the redirect path?


#4

This is the function you’ll need to use to detect the form submission

https://api.jquery.com/ajaxcomplete/

From there just piece together the URL and set window.location to the URL.