Hi all, I want to create a recipe page with 3 different checkbox groups for different filters.
Currently, I have 1 checkbox group and linked it to a repeater.
Could anyone assist in guiding me on how to add 2 more checkbox groups to the repeater?
I went digging online but have yet to find a solution
Here is the code that i found online:
import wixData from 'wix-data'; const databaseName = 'Recipes1'; const databaseField = 'tags'; $w.onReady(function () { $w('#checkboxGroup1').onChange((event) => { const selectedBox = $w('#checkboxGroup1').value; addItemstoRepeater(selectedBox); } )} ); function addItemstoRepeater(selectedOption = []) { let dataQuery = wixData.query(databaseName); if (selectedOption.length > 0) { dataQuery = dataQuery.hasSome(databaseField, selectedOption); } dataQuery .find() .then(results => { const filtereditemsReady = results.items; $w('#repeater1').data = filtereditemsReady; }) }
Here's an example using two checkbox groups to get you started: Example: Multiple Groups Filter
Here you will get all the information you need to make your wishes comes true.
https://www.media-junkie.com/pflegeservice