Looking at your code, i just can say, this code never ever has been runing before.
Either you have collected all the parts somewhere from the web, or you have had engaged a real bad developer/programmer to solve your problem.
How ever, your code should look like this example one…
import wixData from 'wix-data';
$w.onReady(function () {myFunction()});
function myFunction (parameter) {
let myQuery = wixData.query("Test-DB")
.find()
.then ((result) => {
console.log("RESULTS: ", result)
console.log("RESULTS-ITEMS ", result.items)
let myDropDownOptions = []
for (var i = 0; i < result.length; i++) {
myDropDownOptions.push(
{"label": result.items[i].title, "value": result.items[i].title},
)
}
$w('#dropdownMember').options = myDropDownOptions
});
}
Of course to be able to run this CODE and fill the dropdown, you have to create a database, where you store all your items, which should later appear in the DropDown.
Here an example of how your DB should look like to test the functionality of this little code-snipet…
