Hi,
I’d like to hide a container box on my page when a field (breeding) in my database is empty for that item. I’ve attempted to make code for this but I’m not much of an expert at putting code together.
import wixData from ‘wix-data’ ;
$w.onReady( function () {
$w( “#dynamicDataset” ).onReady(() => {
let itemObj = $w( “#dynamicDataset” ).getCurrentItem();
if (itemObj.breeding).value !== “” ) {
$w( “#box21” .collapse()
} else {
$w( “#box21)” .expand()
}
});
})