Hello,
I wish to have a conditional logic inside a group field but it doesn't work.
So I take the basic example in your docs and put it inside a group field.
The logic does not seem to work here either. Or do I something wrong?
add_filter( 'rwmb_meta_boxes', function( $meta_boxes ) {
$meta_boxes[] = array(
'title' => 'Brands and Products',
'post_types' => ['page'],
'context' => 'side',
'fields' => array(
array(
'id' => 'test_group',
'type' => 'group',
'fields' => array(
array(
'id' => 'brand',
'name' => 'Brand',
'desc' => 'Pick Your Favourite Brand',
'type' => 'select',
'options' => array(
'Apple' => 'Apple',
'Google' => 'Google',
'Microsoft' => 'Microsoft'
)
),
array(
'id' => 'apple_products',
'name' => 'Which Apple product that you love?',
'type' => 'radio',
'options' => array(
'iPhone' => 'iPhone',
'iPad' => 'iPad',
'Macbook' => 'Macbook',
'iWatch' => 'iWatch'
),
// Hide this field when user selected a brand that's not 'Apple'
'hidden' => array( 'brand', '!=', 'Apple' )
)
)
)
)
);
return $meta_boxes;
} );
Thanks for your help
Jürgen