Is their a way to hide an element automatically when there is no information what so never within the cell form a collection(an blank cell)? If so how can this be done?
I’m try to hide a youtube video element because their are some cases where they is no YouTube URL to change the video, if possible I like to subsatue the blank video for an image.
if value = ture.show
or
if value === 0.hide button (something like this?)
I hope this makes sense?
Set the video element to be hidden or even collapsed on load via the Property panel .
When the page loads and the dataset ready check if the field has a value. In the case the value exists, show the element.
Here is a sample code you can adapt by changing the IDs of your dataset, video field, and video element.
I am trying to do the same thing but having trouble getting the code to work. I have all of the elements in a box and I do not want to show a box until data is entered into the dataset. When I put in my dataset it says my dataset is not a valid selector name.
Has anyone gotten this code to work? I am trying to hide an image. so when i use the suggested code above with my info subbed in it just hides all images instead of the ones that contain not value/info in the field.