Yes of course:
add_filter( 'rwmb_meta_boxes', 'partnership_collection' );
function partnership_collection( $meta_boxes ) {
$meta_boxes[] = [
'title' => __( 'Sponsored summary?', 'your-text-domain' ),
'id' => 'sponsored-summary',
'post_types' => ['research'],
'fields' => [
[
'name' => __( 'Partnership summary?', 'your-text-domain' ),
'id' => 'partnership_summary',
'type' => 'radio',
'options' => [
1 => __( 'Yes', 'your-text-domain' ),
0 => __( 'No', 'your-text-domain' ),
],
],
[
'name' => __( 'Select partner', 'your-text-domain' ),
'id' => 'select_partner',
'type' => 'post',
'label_description' => __( 'A way to hide the partner from the front-end', 'your-text-domain' ),
'post_type' => ['partners'],
'field_type' => 'select_advanced',
'visible' => [
'when' => [['partnership_summary', '=', 1]],
'relation' => 'or',
],
],
[
'name' => __( 'Hide partner acknowledgement', 'your-text-domain' ),
'id' => 'control_partner_visibility',
'type' => 'radio',
'options' => [
1 => __( 'Show', 'your-text-domain' ),
0 => __( 'Hide', 'your-text-domain' ),
],
'std' => 1,
'visible' => [
'when' => [['partnership_summary', '=', 1]],
'relation' => 'or',
],
'inline' => false,
],
],
];
return $meta_boxes;
}
Ideally I want to add that third field as a condition as well, if control_partner_visibility ==1
I realise I also have the same issue on another section when combining multiple conditions. So I hope this fix applies to the other one as well.