I have a repeater connected to a dataset.
When clicking on the image of a repeater container, the visitor is redirected to a dynamic page.
In my dataset I have a boolean field which is called “enConstruction”.
When the boolean field is true I want an image to be displayed to a container to prevent the click.
I wrote this code but it does not work, someone has an idea?
import wixData from 'wix-data';
$w.onReady(function () {
$w("#dataset1").onReady(() => {
$w("#repeater1").forEachItem(($item, itemData, index) => {
if ((itemData.enConstruction) === true) {
$w('#vectorImage1').show;
} else {
$item('#vectorImage1').hide;
}
});
});
});
Thank you in advance
#dataset #repeater #forEachItem