An issue I keep running into when using dynamic pages is when certain pages don’t have data for certain fields. I’m currently building a site for a shopping centre, some stores have websites, phone numbers, photos and other details to show, while other stores don’t.
When that happens, positional text or images are shown for the empty fields. So far I’ve worked around this by entering a ‘space’ for text fields or a blank image for images, but this doesn’t always solve the problem. Buttons are a particular issue as they will still be visible but not link to anywhere.
Is there not yet a way to automatically hide or collapse an image/text box/button etc when the field is blank in the CMS? It really seems like a no-brainer.
I’ve seen a few older posts where people helped out with coding solutions, but I thought maybe there’s been a non-code solution introduced since then that I’ve missed? Hope so.
you can setup the filter to display only the content which’ve got the connection, so the in Filter display you got to select Not Empty option
Thanks Andrew. In this case, when I try filtering by URL for example, it seems to hide the entire store if that store doesn’t have a website. Is there a way to keep the store and all the other fields visible but just hide the ‘Visit Website’ button? Example…
not Empty should only affect fields without the connection, so is the filter you are setting up affecting other elements?
could you take a video of whole process?
Thanks Andrew. Perhaps I’m not setting this up correctly. Here’s the steps I’m taking, let me know if this is incorrect…
I select the dataset then choose settings:
I then +add filter:
Then I select Field: Website (URL and Condition: Is not empty:
Am I in the right place?
I have the same problem. I have followed these steps, but instead of not displaying the button, it removes the entire record from the repeater.
I would like it to not display the element, in this case hide the button, and display the record.
Has a no code solution been found yet?
3 Likes
I have the same issue here. I have two blocks of content, one below the other and both being populated by different fields in the CMS (top is a description of an event, bottom is the Client Comments panel). If for any reason, there is no description of the event in the CMS field, I want to hide that panel, so the lower (Client Comments) panel moves up to take its place.
Instead, at the moment, I just get a blank white box above the Client Comments panel making it look like it’s in the wrong place, too far down the page. Very ugly.
1 Like