Multi-State page selection

Question:
How do I create a conditional logic based on radio buttons and drop down options to move to different states?

Product:
[Which editor or feature is your question most relevant to? Wix Editor

What are you trying to achieve:
I want to have the user select a radio box on a state page - if the radio button equals 1 or 2 then go to the respective state pages

I also want to have the user select a drop down on a state page - if the drop down equals a or b then go to the respective state pages.

Currently my code seems to be ignored and just moved to the next state box regardless of what is chosen.

Here is a code snippet of the relevant code:

if (dropdown1Value === “1”) {
changeState(‘service1’);
} else if (dropdown1Value === “6”) {
changeState(‘service6’);

if (radioGroup1Value === “type”) {
changeState(‘count’);
} else if (radioGroup1Value === “product” || radioGroup1Value === “location” || radioGroup1Value === “service”) {
changeState(‘contactus’);

Is that your entire code? Because that’s not going to do anything. You have to get the value first before you can use it in an if-statement to compare it with another value.

Never mind I will try this a different way