Form's Redirect Url changes depending on user's input

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

Thank you in advance

Two basic parts;

  1. A function that translates your form selections into a URL.
  2. A mechanism that uses the URL to redirect the user to the PDF.

#2 can be done as either;

  1. 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.
  2. 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.