Hey so I have been working on this for days now. I just need to know how to do this. If you can help me please. Here is a link to my page.
click here to view my current project.
Here is my code:
import wixData from 'wix-data';
import wixLocation from 'wix-location';
$w.onReady(function () {
$w("#countyList").options = [
{"label": "Utah County", "value": "/utah-county"},
{"label": "Second County", "value": "/second-county"},
{"label": "Third County", "value": "/Third-County"},
];
if ($w('#countyList').options === "label" && "Utah County") {
$w('#button5').label === "Utah County";
} else if ($w('#countyList').options === "Second County") {
$w('#button5').label === "Second County";
} else if ($w('#countyList').options === "label" && "Third County") {
$w('#button5').label === "Third County";
} else {
$w('#button5').disable();
}
})
$w.onReady(function () {
$w('#button5').disable();
$w('#button5').label = "Select a County";
})
export function button5_click(event) {
let goToUrl = $w('#countyList').value;
wixLocation.to(goToUrl);
}
export function countyList_change(event) {
$w('#button5').enable();
}
What I am trying to do is change the label text to what I select from the drop down to have the label change. Any help, please is appreciated.