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
So i tried this now and it doesnt work. Let me say that i can’t code at all, and i’m just trying to figure this out here on the forurms. I get these messages
And i get this little yellow triangle on the left side of the code line saying “parameter index is never used”
I appriciate your help, thanks alot!
Alexander
Next step is the coding… I’ve removed the last onItemReady() function and put the $w(“#repeater1”).onItemReady inside the onItemReady() function…
I hope i did it correctly?
It look like this:
The field key is correct and the link is as followed: https://alexanderweidinger.wixsite.com/segaf/nyehder.
It was the wrong picture we posted before, this is how it looks now. And it still hides all the buttons.
How about the connection between button 1 and the boolean collum, should there be any, except for the connection in the database? Right know we have it connected to a pdf collumn in the dataset and if it cotains a pdf the boolean column is marked “true”, but the button can’t be connected with the boolean, which i guess makes sense.
Aha! I discovered the problem. The if statement should be:
if (itemData.knappdf === true) {
Wow! Can’t believe I missed that. I hate it when I’m stupid. The value in the knappdf field is a boolean and not a string. Therefore, no quote marks around true.
Good afternoon I am writing about this code, I have a database with multiple restaurants and I need to show a reservations button if they offer online reservations. I have a field restReservationsLink as a boolean value and my button is button5 which is the one i need to show or not based on boolean…but for some reason it does not work…
Thanks for the quick response, I actually made a detail page that connects to my repeater, www.dineupnj.com is my website…please take a look and please comment