Meta Box Switch field output differs from native function

Bricks Version: 1.5.7

When I use a Meta Box Checkbox field to provide an enabled / disabled functionality for the user Bricks works correctly when outputting the field’s value:

{mb_whatever_the_tag_is} correctly outputs “Yes”/“No” like the native rwmb_the_value function does (see Checkbox - Meta Box Documentation) and “1”/“0” when used with the :value modifier.

When I use a Meta Box Switch field though there is a difference between the Bricks output and the native output:

While the native function rwmb_the_value outputs “On”/“Off” (or whatever custom labels you specify in the field’s settings – see Switch - Meta Box Documentation) Bricks outputs “1”/“0” (which should only be the case when the :value modifier is used).

Note: In my screenshot the native output is localized since it is a German installation (“Ja” = “Yes”, “Aus” = “Off”).

1 Like

I am having the same problem and it is still the case in 1.9.1.1

Did you solve it?

1 Like

I noticed this problem today too when adding a new switch field in Meta Box. My conditions seem to always show “unchecked” or “off”, never “checked” or “true” despite switching the toggle on in the CPT. Seems there’s an issue here or otherwise I’m just misunderstanding how this works.