Hi! I have a database containing multiple Booleans and a page with a dropdown containing multiple values. My question is: Does anyone know how to hide a value of a dropdown depending on whether the boolean is active or not? Thanks in advance!
top of page
Important forum update
This forum is migrating to one unified Wix community forum starting July 26th, and will be read-only during the process.
Wishlist Page is the official platform for requesting new features. You can vote, comment, and track the status of the requested features.
bottom of page
No Code Solution:
Add a dataset with the connected data you want, add a filter to the dataset and connect the dropdown element to the dataset.
Code Solution:
import wixData from 'wix-data' $w.onReady(async () { const { items } = await wixData.query('Booleans').find() //Filters only the true ones, but the items have to be boolena items const options = items.filter(Boolean) $w('#dropdown').options = options })