Collapse image if empty

I’m working on a commenting system. If the “comment / image is not empty” I want to show it. If the “comment / image is empty” how can I collapse that space where the image would be?

Put it inside a group, make the group collapsible when hidden and a constraint that says the group is not visible when the image is empty.

3 + 2 + 1 = Collapsed Hidden Group


Thanks for posting.

I set all of the parameters per your instruction.

Just curious on the constraint though. Should that constraint be set on the group or the image (I’m pretty sure the group)? Below is what I have so far but I’m not sure how to set the “when the image is empty” portion.


Yes, the conditional should be on the group.

You need to reference whatever datatype and data entry the image is stored on.

For example, if it was a user profile image on a profile page, you’d use when current page's user's profile image is empty

Then use This element is visible and uncheck the box.

(or do it the other way round - have the group not visible on pageload, and set it to be visible when the image is not empty).

I think I’m close but my condition seems off a bit still. I think it is the “And” statement. I do not see a “When” option. Sorry for all the dumb questions/responses. I’m still pretty new to all this.



You need to remove the ‘this group isn’t visible’ part from the condition.

Just use the when ‘current cell’s post image is empty’.