I want a text box and a button to hide if the database is empty. Currently, the elements dissapear when I use this code:
$w.onReady(() => { $w("#dataset1").onReady(() => { const item = $w("#dataset1").getCurrentItem(); if (!item.button1) if (!item.text18) { $w("#button1").collapse(); $w("#text18").collapse(); } else { console.log("Showing"); $w("#button1").show(); $w("#text18").show(); } }); }); The problem is when I "fill" the database the elements still doesn't show - they are still collapsed even though I write in the database.
What's the meaning of:
if (!item.button1)
?