The repeater issue.

Hi guys,

I have a custom member area, where I would also love to let the user upload texts, photos, and videos shown in the repeater.

For example (this should be the final result).

When the user will upload text1 with an image, and the text2 without, then there is an issue.
The image in text1 will collapse based on my code.

$w.onReady(function () {
    $w("#dataset3").onReady(()=>{

 let itemObj = $w("#dataset3").getCurrentItem();

 if(!itemObj.video){
   $w("#videoPlayer1").collapse();
 } 

 if(!itemObj.foto){         
   $w('#image85').collapse();
 } 
});
});

I’m currently going true the articles about the repeater.
Nevertheless, if someone is willing to share the knowledge, then I would appreciate it.

Br,
Jakub

Try using forEachItem repeater method and put your if statements inside.