i am looking for a way to redirect users depending their choice on one field (drop down).
each choice send the user to a different URL.
It’s very easy to create you need to check the user choice when the user submits the form depending on the user’s choice you can send them to different pages with switch statement here is an example:
import wixLocation from 'wix-location';
$w("#submitForm").onClick((event) => {
let value = $("#dropDown").value;
switch (value) {
case "firstCase":
wixLocation.to("url that you want to send user")
break;
case "secondCase":
wixLocation.to("url that you want to send user")
break;
}
})
Notes: if this redirection is important to create a function in the backend to get the result otherwise users will be able to change redirection but if it’s not very important you can just put this code into the frontend.
Also, you can add the default state to switch if the dropdown is optional.
THX!