Streaming live at 10am (PST)

Form redirect URL based on dropdown select

Hi everyone,

I’m trying to redirect a user to a different page after submitting a form based on their selection from a dropdown:

My dropdown is countries, and based on what country the user select, I want him to be redirected to that country-specific page, for example, if the user selects Canada from the dropdown, he should be redirected to note that country is a CMS collection.

My form ID is wf-form and my dropdown field ID is country

  1. what kind of custom code to use here?

Thanks in advance

You should hire freelancer to solve this idea.

The idea ±

0-Event: After form submit (No API for this idea).

1-Get the select value:

var varFromSelectMenu = document.getElementById("selected2").value;

2-Create var:
var redirectURL = "/country/"+varFromSelectMenu

3-And replace location with the value from step 2:

1 Like

Thanks, I guess that’s too complicated for me, there was an answer to a similar problem in this post and I am hoping to get the custom code for my case
similar issue

more on javascript…url redirect