Hi GOS,
Yea I saw this a thought this might have been the answer I was looking for, even though it means creating a second database just for my genre ‘categories’ but this didn’t seem to work either and possibly even clashed with the code I already have in place to filter using the other dropdowns I already have in place.
I’ve attached a snippet of the code I’ve been applying to my dropdowns with a change in state triggering the filtering across on dropdowns and then showing the results in the gallery. Is there a line of code I can add to then include the ‘checked’ boxes from my latest dropdown?
// Category Dropdown
$w.onReady(function () {
//TODO: write your page related code here...
});
export function iCategories_change(event, $w){
$w("#dataset1").setFilter(wixData.filter()
.contains("category", $w('#iCategories').value)
.contains("eventType", $w('#iEventType').value)
.contains('tags', $w('#iSearch').value)
.ge("costs",parseFloat($w('#iPriceFrom').value))
.le("costs",parseFloat($w('#iPriceTo').value)))
.then((results) => {
console.log("Dataset is now Filtered");
$w("#gallery1").data = results.items;
})
.catch((err) => {
console.log(err);
});
$w("#gallery1").expand();
}
Appreciate any ideas.
Thanks,
Owen