I am trying to hide a Gallery element in my Repeater which is linked to a dataset if the field in that dataset is empty. I don’t see any solutions for this scenario, so as a workaround, I’m trying to now hide the Gallery element based on whether another field in my dataset is True (boolan field “imageUploaded”) so that I can manually mark the field as True if I want the Gallery element to show.
Here is the code I’ve got:
$w.onReady(()=>{
$w(‘#dataset1’).onReady(()=>{
$w(‘#repeater1’).onItemReady(($item,itemData)=>{
if(itemData.imageUploaded===true){
$item(‘#gallery1’).show();
}
else{
$item(‘#gallery1’).hide();
}
});
});
});