Support Forum
Hi,
I created a Post field and set the Conditional Logic in Advanced as below.
However, when Gutenberg is enabled, conditional logic does not work.
This field has been displayed for all post types.
add_filter( 'rwmb_meta_boxes', 'your_prefix_register_meta_boxes' );
function your_prefix_register_meta_boxes( $meta_boxes ) {
$prefix = '';
$meta_boxes[] = array (
'title' => esc_html__( 'test', 'text-domain' ),
'id' => 'test',
'post_types' => array(
0 => 'post',
1 => 'general',
),
'context' => 'normal',
'priority' => 'high',
'fields' => array(
array (
'id' => $prefix . 'post_vw01o0dnsbe',
'type' => 'post',
'name' => esc_html__( 'Post', 'text-domain' ),
'post_type' => array(
0 => 'post',
),
'field_type' => 'select_advanced',
'visible' => array(
'when' => array(
array (
0 => 'post_type',
1 => '=',
2 => 'page',
),
),
'relation' => 'and',
),
),
),
);
return $meta_boxes;
}