I am trying to set visibility of an Advanced Select Box based on the checked value in a Checkbox List and I’m doing this via the Meta Box Builder extension in WP admin.
Although the doco is very clear in terms of code to achieve this (athttps://docs.metabox.io/extensions/meta-box-conditional-logic/) I am unsure what to select in the Builder UI.
If the user checks ‘Australia’ in in my list of countries (
checkbox_list), then the ‘State – Australia’ select box (
select_advanced) will appear.
‘State – Australia’
select_advanced>> Advanced >> Conditional Logic – the settings in this section are as follow:
VISIBLE when ALL of these conditions match:
[field] [operator] [value]
FIELD: Unsure what to put… my ‘checkbox_list’ ID is
c_countryand the individual input checkboxes all have the name
c_countryin the admin edit screen source code
VALUE: Unsure whether to put “Australia” or 1/true (depends on earlier field/operator)
I have played around with a few options that I thought corresponded to the equivalent code from the docs but don’t seem to be getting it right because the ‘select_advanced’ field is permanently visible right now.
Any guidance on the correct settings would be great. (Personally I would be comfortable coding it instead BUT I need to get familiar with the Builder interface so I can train my team.)
You must be logged in to reply to this topic.