I have been searching and trying for a few days now but can’t seem to find the right answer to my question. Forgive me if this has been asked before, then please point me in the right direction.
I’m trying to understand how I can show or hide some page elements like an image, button or video player, based on values I get from the database, using custom code.
My database has movies in them (title, editor, year, runningtime, etc) and the only thing I want to do is hide a specific button on a Dynamic Page (the movie details page) when the Field Key (type: boolean) is TRUE.
So I would nee something in code like:
get all database values for this film from the database
if = TRUE hide
else show
Tried hundreds of code snippets and combinations, but can’t seem to get this to work.
Hi estefano, can this code be written directly in the “page code tab” or do I have to create a js file in the backend? My understanding is that Wix collections cannot be accessed from the code tab of the page.
Thank you so much