I know that you can use this feature (in pic below) to connect to another category within a dataset, but I’m trying to figure out how I could instead connect the drop down selection to another page.
I’m creating a form & want each dropdown selection to take you to a different part of the form when selected.
Thanks in advance!
Then you need to do some array to populate the dropdown with.
Like:
let urls = ;
let url = {
“label”: “Site 1”, “url”: “https://wix.com”
}
urls.push(url);
Every time you push one url into urls there is a new record created in the array.
Create of those by code or from Dataset and then do
$w(“#dropdown1”).options = urls;
Then the dropdown will hold Site 1 and so on and then you need to connect the onChange event for the dropdown. Go to properties panel and click the event onChange.
In that function write:
wixLocation.to($w(“#dropdown1”).value);
Also remember that you will need to use the import statement for wixLocation so at the top of your page start typing import and select the import wixLocation one in the list.
Then test it.