How can I hide the grey image boxes when no images are set in a CMS field?

Hey I am trying to work out the best way to reference multiple images in the one project. The issue is that every project may vary in the amount of images it has. So one may have four images and another two.

So far the way I have my first solution was to add four image fields to the projects collection and then reference each other project image to an image on the projects template page. However the issue with this is that if there are only two images and not four I get and empty image grey box. I thought if there were only two images the other two image fields would just disappear and the space would be reduced.

My second solution was to use a multi reference to a projects images collection but I think I would have the same issue here.

Does anyone know how can I get around this issue? or am I just going about it the wrong way?

Public share link:

Thanks I have solved my own issue with the conditional visibility.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.