Conditional visibility – multiple conditions on one element

From what I can tell the built-in WF Conditional Visibility feature doesn’t allow for multiple conditions on one element. Is there a workaround for this?

I’d like to be able to do things like:
Element is visible when…

– Custom filed A (Option)
– Does not Equal
– Condition A
plus
– Does not Equal
– Condition B either

or

– Custom filed A (Option)
– Equals
– Condition C
plus
– Equals
– Condition D

Maybe some custom code?
Or adding an additional invisible element on top of the element in question to add more conditions (I guess that would also require an interaction)?

Has anyone come up with a solution for this?

Thanks for sharing!


hi @Rapha this functionality is called multidimensional filter it is a bit complex code if you write it from scratch and I have doubt that someone will share it for free. Anyway, you can look into Finsweet as they provide some kind of filter that is based on CSS classes. It is free and IMO is worth to look into.

…hi Raphael :slight_smile:

I did something like this with a workaround: I nested a series of div-blocks and applied a different visibility condition on each block.

So imagine div-block A is nested in div-block B which is nested in div-block C along with a text block, with different visibility conditions applied to each of the div blocks. If any of the conditions are met then the block A, B or C is made not visible and the text block disappears.

It worked for me nested 3 div-blocks deep, I didn’t see any downsides (but someone might be able to point some out.) But make sure you name the classes something that will help you know which is which because it gets confusing real quick :slight_smile: Probably would help to map it all out first on paper before building it to get the logic right, because I could imagine some scenarios where the text would disappear when you didn’t want it too.

2 Likes

Hi Mark. I did something similar – just not nested as deeply as yours. So basically one copy of that particular element per each desired condition. Works fine.
But it may get complicated and inflated when you try to have multiple conditions on collection lists.
Like Stan pointed out correctly, F’inSweet and others offer custom code solutions and workarounds that may do the trick, at least in some cases.

However, I believe this has wish-list potential as a built-in native WF option.