simple show/hide button based on dataset Field Key value

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