-SOLVED- Change text from database with via checkbox onChange

Ok, I think I understand, first of all, I would use radio buttons instead of checkbox because you want only one choice, am I right?
second, you can use an onChange on the radio button group, get the chosen value, and use a wixData.query() function to get the items while refining the query with the chosen value using the eq() function.
Like so:

$w("#radioGroup1").onChange((event, $w) => {
 let choosenValue = event.target.value;
        wixData.query("testCollection")
        .eq("private", choosenValue)
        .find()
        .then((results) => {
            $w("#text").text = results.items[0].price
        })
    });

I hope that is what you meant, if not, please elaborate so I can help you further!

  • Lior