Streaming live at 10am (PST)

Conditional Visibility on Reference Field

Hi, I am trying to hide elements on a multi-reference field item on a collection page, set to hide when it is empty. Is this possible?


Here is my site Read-Only: https://preview.webflow.com/preview/livingstonleandy?utm_medium=preview_link&utm_source=designer&utm_content=livingstonleandy&preview=16575cb30c4b97a21151534a23b23fb0&pageId=5d2aeed3e06f4c27799d8a21&itemId=5d2aeff3b9b05d4e883f7e6c&mode=preview

(how to share your site Read-Only link)

@millhouse totally, here’s the article on this from the university https://university.webflow.com/article/conditional-visibility . I had a look at your read-only link and what I would do, since you’re trying to hide several items, is to create a switch button. That allows you to hide the whole div when the switch is either on/off.

Thanks, what I want to do is hide a div that contains collection items from a multi-reference field, in this case team members, when that multi-reference field (associates) is empty. I do not see anywhere where this can be accomplished. So if there are no associates available for say litigation department I would like the associates div to hide on the litigation collection page.

Kind Regards,

Cell: +27 83 234 5694

Email: michael@millhouse.co.za

Millhouse Design

11 Glenroy Road, Westridge, Durban, 4001

Millhouse-Michael-Sign.jpg
Millhouse-Monogram-Sign.jpg

Good morning @millhouse

It looks like you are missing a few fields in your layouts to make this work.

My recommendation is to refer to @sarahfrison’s post about using the 'Switch" feature. This function gives you so much more control for what you can turn on and off based on its selection.

Watch the video: https://cl.ly/6b9de7

Happy Designing,
Brandon

1 Like

@millhouse what @WebDev_Brandon said :slight_smile: . The switch I recommended is really the easiest way to do this.

Thanks Brandon, that makes sense. I am going to give it a go shortly.

Kind Regards,

Cell: +27 83 234 5694

Email: michael@millhouse.co.za

Millhouse Design

11 Glenroy Road, Westridge, Durban, 4001

Millhouse-Michael-Sign.jpg
Millhouse-Monogram-Sign.jpg

I have added the switches and associates each member with a switch. When I go back into the practice area collection page and try to filter as you suggested, I don’t see the switches.

Kind Regards,

Cell: +27 83 234 5694

Email: michael@millhouse.co.za

Millhouse Design

11 Glenroy Road, Westridge, Durban, 4001

Millhouse-Michael-Sign.jpg
Millhouse-Monogram-Sign.jpg

Thanks Sarah, I think I understand but somehow I cannot seem to filter out with the switches in place, maybe I am not understanding correctly.

Kind Regards,

Cell: +27 83 234 5694

Email: michael@millhouse.co.za

Millhouse Design

11 Glenroy Road, Westridge, Durban, 4001

Millhouse-Michael-Sign.jpg
Millhouse-Monogram-Sign.jpg

@millhouse The switched need to be inside of the CMS you want to use them on, so not on the ‘team member’ pages but the ‘practice areas’, then they’ll show up under ‘conditions’

Thanks Sarah. By adding the switch to the practice areas collection I was able to switch them off for the collections that were empty.

ah, perfect. Glad to hear you were able to figure it out @millhouse!