Custom Fields
Re-Envisioned
Support General Conditional logic does not work

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #27717
    Long Nguyen
    Moderator

    Hi Yumiko,

    This issue has been fixed in the new version of Meta Box AIO 1.13.8. Can you please re-check the conditional logic for subfields? For example

    add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );
    
    function your_prefix_function_name( $meta_boxes ) {
        $prefix = '';
    
        $meta_boxes[] = [
            'title'  => __( 'Post Meta', 'your-text-domain' ),
            'id'     => 'post-meta',
            'fields' => [
                [
                    'name'       => __( 'Group', 'your-text-domain' ),
                    'id'         => $prefix . 'group',
                    'type'       => 'group',
                    'save_field' => 1,
                    'fields'     => [
                        [
                            'name'       => __( 'Text', 'your-text-domain' ),
                            'id'         => $prefix . 'text',
                            'type'       => 'text',
                            'save_field' => 1,
                        ],
                        [
                            'name'       => __( 'Textarea', 'your-text-domain' ),
                            'id'         => $prefix . 'textarea_gzljad6ej2d',
                            'type'       => 'textarea',
                            'save_field' => 1,
                            'visible'    => [
                                'when'     => [['group_text', '=', 123]],
                                'relation' => 'or',
                            ],
                        ],
                    ],
                ],
            ],
        ];
    
        return $meta_boxes;
    }
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.