I have an image in a repeater, that pulls a url from my database on a dynamic page. I want that image to only show up when there is a url in the database field, otherwise it should not show. I tried the code below and it works outside of a repeater, but once I add it to my dynamic page and repeater it doesn’t work.
Any help is greatly appreciated! I can’t be the first to try to do this, but I’ve searched the forum for weeks and haven’t found the solution.
$w.onReady(function () {
//TODO: write your page related code here...
$w("#image5").hide()
$w("#repeater1").forEachItem(($item, itemData, index) => {
let checkvar = $w("#image5").link
let n = checkvar.includes("https")
if (n === true) {
$w('#image5').show();
}
});
});