collapse repeater

#dataset1 - dataset

#teamRepeater - repeater

photo - field key of the database

#container1 - container in the repeater

$w.onReady(function () { $w('#dataset1').onReady(() => { $w('#teamRepeater').forEachItem(($item, itemData, index) => { if (!itemData.photo) { $item('#container1').collapse(); } else { $item('#container1').expand(); } }); }); });