I have two dropdowns. Second one is conditional on the first.
![](https://static.wixstatic.com/media/a27d24_4e7e9dd3b8ab4e26ad48cc6a5ef612b7~mv2.png/v1/fill/w_736,h_422,al_c,q_85,enc_auto/a27d24_4e7e9dd3b8ab4e26ad48cc6a5ef612b7~mv2.png)
When the user selects district then town, I want the button to take them to the correct dynamic page URL. At the moment they are going to the first URL of the district selected.
Here is my code so far.
![](https://static.wixstatic.com/media/a27d24_8a70e8477efc40eda649d663b4dd08c9~mv2.png/v1/fill/w_980,h_700,al_c,q_90,enc_auto/a27d24_8a70e8477efc40eda649d663b4dd08c9~mv2.png)
Here is my database:
![](https://static.wixstatic.com/media/a27d24_826fd16a81bb4e9c87c17eeceb268fff~mv2_d_2806_1398_s_2.png/v1/fill/w_980,h_488,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/a27d24_826fd16a81bb4e9c87c17eeceb268fff~mv2_d_2806_1398_s_2.png)
I am told that I need to set URL onClick using IF ELSE statements. After searching everywhere I still don't know how to apply it to my case above.
I have connected the button to the fence-builders database (see image below).
![](https://static.wixstatic.com/media/a27d24_00df74055720447683b52059e4718cb0~mv2.png/v1/fill/w_980,h_517,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/a27d24_00df74055720447683b52059e4718cb0~mv2.png)
What do I do? Thanks team!
Anyone know how to do this?
Anyone one have any ideas? I'm fairly certain it's quite simple - but I've already spent hours trying to figure it out and I'm on deadline :(