Conditional logic does not work

Support General Conditional logic does not workResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #27699
    YumikomYumikom
    Participant

    Hi,

    Conditional logic does not work for subfields in the group.
    The bug is still reproduced in the file I sent to support in the topic below.
    https://support.metabox.io/topic/broken-after-update-meta-box-builder-4/

    Thanks and regards,
    Yumikom

    #27717
    Long NguyenLong 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;
    }
    #28264
    YumikomYumikom
    Participant

    Hi,

    Thank you for notifying us of the specification change of Conditional Logic.

    I use Metabox on many sites, but on some sites the Conditional logic created by the Builder stopped working at all.

    Custom Field saved in Builder doesn't work, so some of them work correctly when I register with PHP Code.
    Broken custom field registrations by builder when it automatically upgrade from Builder 3 to 4, and move to PHP code registration one by one.

    Builder instability makes me uneasy. If you are using WordPress as your CMS framework, it may be safer to register in your PHP code than using the Metabox Builder. We want to build a more practical UI on the CMS backend.

    Thanks and regards,
    Yumikom

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.