Could you let me know if this particular code looks formatted correctly? I have triple checked all the spellings, but I can not get this search filter to work. I have it working on another page with fewer filters, so I’m assuming I have a slight issue with the code for more filters.
Button 1 = Filter
Button 2 = Clear Filters
import wixData from “wix-data”;
$w.onReady(function () {
$w(“#button1”).onClick(()=>{
$w(“#dataset1”).setFilter(wixData.filter()
.contains(“issues”, $w(“#issues”).value)
.contains(“sector”, $w(“#sectors”).value)
.contains(“aqua_wild”, $w(“#fisheries”).value)
.contains(“regions”, $w(“#region”).value));
})
$w(“#button2”).onClick(()=>{
$w(“#dataset1”).setFilter(wixData.filter()
);
$w(“#issues”).selectedIndex = 0;
$w(“#sectors”).selectedIndex = 0;
$w(“#fisheries”).selectedIndex = 0;
$w(“#region”).selectedIndex = 0;
});
});