Customizing submit button depending on user input

This is my first time doing any sort of coding and I have no clue how to do it – just sort of making a website for a school project. I created a drop-down menu and want to make it so that the submit button redirects the user to a different page depending on their input. I have no idea how to do this and I’ve even tried making multiple submit buttons but nothing seems to be working. If anyone could help me that would be great! Thanks ~

You will need to add an onChange() event handler for your Dropdown. Then, depending on the which item was selected, you can change the Button label .

The following code is a very simple example that shows button1 being assigned a new label based on the dropdown option that was selected:

$w.onReady(function () {
   $w("#dropdown1").onChange((event) => {
      $w('#button1').label = event.target.value;
   });
});

Hi I am doing a very similar function like this, using dropdown to direct people into different pages. I am very new to coding, should i change the ‘value’ to the dropdown value and adding more to this?

And also how to redirect the button value to a new page? Thank you!