Ok, let’s go trough your SETUP first.
You have a DATABASE ? → YES, ID —> ???
You have connected a DATASET to your DATABASE → YES → “expeditions” .
Inside of your DATABASE you have a BOOLEAN-DATAFIELD with ID → “disclaimer” .
And you have a BOX on your page, with the ID → “infobox” .
I want it so that when I tick the Boolean in the dataset, the box on the page expands and shows the content.
Now the question is, if you also have used a REPEATER?
How do you expect your results to be shown?
Just one ITEM per each page?
Or do you want to have all DATABASE-RESULTS inside a LIST on just one page?
To collapse an element —> $w(‘yourElementIDhere’).collapse();
To expand an element —> $w(‘yourElementIDhere’).expand();
To hide an element —> $w(‘yourElementIDhere’).hide();
To show an element —> $w(‘yourElementIDhere’).show();
On your page your CODE will strt something like this…
$w.onReady(()=>{
$w('#dataset1').onReady(()=>{
//here you will have to generate your code.....
//but first make sure how exactly you want to present your results (take a look onto the mentioned questions).
});
});