Hi everyone,
how do I set up the conditions for metabox switchers in bricks? I tried many possibilities but nothing worked so far.
Hi everyone,
how do I set up the conditions for metabox switchers in bricks? I tried many possibilities but nothing worked so far.
Have you tried === 1 ?
In the database, Metabox switch is stored as 0 or 1
Yes I have tried that too == 0 or 1 nothing works
For anyone facing the same struggle, I got the switcher to work with these settings.
In case a JetEngine user is searching for "Switcher"Conditions, here is the variant for it
Value = true or false
it works with acf
I did not work with Metabox, but perhaps you did not specify the field name meta parameter.
@zippa71 Using this setup worked for me
Yes, I forgot to mention one more thing.
When working with ACF. The checkbox has three values, empty, 0 and 1.
Might be the same for you, check it out.
I tried that and it show now all toggles
I tried everything, but the condition is not working for me.
He had === in his suggestion, not ==
Are you using a toggle?
You need to compare against the value of the toggle label value:Label so by default compare looks for label.
There is a filter to allow you to compare against the value which would be {field_name:value}
Dynamic Data – Bricks Academy has more filters etc
With METABOX SWITCH I’m not able to get anything condition to work.
I’ve got the right field. The condition is applied to a whole container and should show/hide based on whether the switch is ON or OFF.
Here is what I’ve tried:
!= 0 : shows the element whether ON or OFF - XXX
!= 1 : shows the element whether ON or OFF - XXX
== 0 : Hides the element whether ON or OFF - XXX
== 1 : Hides the element whether ON or OFF - XXX
!= true : shows the element whether ON or OFF - XXX
!= false : shows the element whether ON or OFF - XXX
== true : Hides the element whether ON or OFF - XXX
== false : Hides the element whether ON or OFF - XXX
Any hints as to what I may be doing wrong?
I’ve tried a radio button field with options OPEN/CLOSED and this works (but I wanted it to be more clear for editing which is why I was trying to get the switch to work):
Thank you for any suggestions!