Hi Guys.
I have a repeater linked to a dataset and the dataset linked to a database. In the repeater i have 2 buttons - one for links and one for files. When you enter a link in a post it will make it "true" in my boolean data column "knapURL". When you enter a file it will make it true in boolean column "knapPDF". And ofcourse they will be false if not entered.
I then want to hide the button "#button1" which is linked to "knapPDF" when it is false and vice versa. Ive tried this solution, but sadly it dosn't work :(
I hope you guys can help me! Thanks alot.
You need to use the Repeated Item Scope for elements in the Repeater (e.g. #button5). You want something like this:
$w.onReady(function () { $w("#repeater2").onItemReady(($item, itemData) => { console.log(itemData.restReservationsLink); if (itemData.restReservationsLink === true) { $item("#button5").show(); } else { $item("#button5").hide(); } }); });
Also, note that in the onItemReady your original code has a typo of w$.