Hi everyone: I am trying to create a WebFlow form with a number of mandatory radio buttons. Once the user selects them and hits submit, they are redirected to a specific URL (pdfs) based on their selection. I am wondering what the best way to achieve this is.
For example the Form:
Question (1): Yes or No
Question (2): Yes or No
If the user selects Yes & Yes: submit = site A
If the user selects Yes & No: submit = site B
If the user selects No & Yes: submit = site C
If the user selects No & No: submit = site D
A function that translates your form selections into a URL.
A mechanism that uses the URL to redirect the user to the PDF.
#2 can be done as either;
Update the form’s action property whenever the selected radiobuttons are changed. For this, set the form to GET, and the action to # in your setup.
Capture the form submit event, and on submit determine the URL and issues a JS redirect. This one is slightly more complex but gives you more options because you can simultaneously use Webflow’s native form submit handler if you want to.