Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 2,416 through 2,430 (of 3,959 total)
  • Author
    Posts
  • in reply to: Conditional logic not working with clones in groups #8478
    Anh TranAnh Tran
    Keymaster

    Hi,

    I've just checked your code and found that the problem is the ID of the radio field, which is type. As this is the radio field, there are actually 2 inputs with the same name. The JavaScript tries to *guess* the field using this selector [name*="type"]. It's ambiguous, and actually it returns *another WordPress field*, which is the post_type (a hidden input).

    I'd suggest using prefix for your field's ID (as stated in the documentation). It's a good way to keep the field ID/name unique, and thus make the selector works. I've tried changing the ID from type to type123 and it works.

    Please try and let me know how it goes.

    in reply to: ✅Visibility functionality broken #8477
    Anh TranAnh Tran
    Keymaster

    Sorry guys, I've fixed the plugin but forgot to update the version on metabox.io, so the Updater doesn't work. Please try it again, it should be ok now.

    in reply to: ✅Conditional Logic not hidden in collapsible group. #8454
    Anh TranAnh Tran
    Keymaster

    Hello, can you describe the steps you get the bugs 2 and 3?

    Anh TranAnh Tran
    Keymaster

    Hi John,

    The problem with the Updater is fixed. It's in the metabox.io system.

    Regarding the stuffs in the admin list, yes, those are suggested. We also have Admin Columns plugin and I'll think a best way to do that.

    in reply to: ✅Sort sub field based on sub field value #8451
    Anh TranAnh Tran
    Keymaster

    Yes, you can. After getting group value, you can sort sub-groups using a custom function, like this:

    $group = get_post_meta( get_the_ID(), 'football_league_table_option', true );
    usort( $group, function ( $a, $b ) {
        $score_a = $a['football_team_win_stat'];
        $score_b = $b['football_team_win_stat'];
        if ( $score_a == $score_b ) {
            return 0;
        }
        return ( $score_a > $score_b ) ? - 1 : 1;
    } );
    $counter = 0;
    // other code
    in reply to: ✅Drag and drop reordering will be hidden the content #8450
    Anh TranAnh Tran
    Keymaster

    Hello, what content did you mean? Is it hidden when cloning or after cloning? Can you take a screenshot?

    in reply to: post_id in hook rwmb_frontend_after_process is missing #8434
    Anh TranAnh Tran
    Keymaster

    Hello, I've just added submitted post ID to the $config variable. Please update the plugin.

    Anh TranAnh Tran
    Keymaster

    Hi, I tried that and couldn't replicate the bug. Here is what I have:

    https://imgur.com/a/CYP77

    Can you try again?

    in reply to: Show/Hide an option in select field #8422
    Anh TranAnh Tran
    Keymaster

    Hi, currently it's not possible. You can show/hide the whole field only 🙁

    in reply to: Category output not working properly #8421
    Anh TranAnh Tran
    Keymaster

    Hi,

    I think the problem comes from how you get the custom field data for categories. Basically, this loop:

    foreach ( $cats as $cat ) {
    	$term_id = $cat->term_id;
    }

    makes $term_id is always the ID of the last category. No matter how many categories, it always get the last category.

    That's why you always see the same data. Please take a look at that.

    Anh TranAnh Tran
    Keymaster

    Oops, I've just fixed it in version 1.0.1. Please update.

    Anh TranAnh Tran
    Keymaster

    Hi again, this bug is fixed.

    in reply to: ✅MB Relationships - Using each_connected multiple times #8410
    Anh TranAnh Tran
    Keymaster

    No problem. Here is the code for registering relationships:

    add_action( 'mb_relationships_init', function () {
    	MB_Relationships_API::register( array(
    		'id'   => 'posts_to_pages',
    		'from' => 'post',
    		'to'   => 'page',
    	) );
    	MB_Relationships_API::register( array(
    		'id'   => 'posts_to_posts',
    		'from' => 'post',
    		'to'   => 'post',
    	) );
    } );

    And here is the code to fetch connections (in index.php file):

    global $wp_query;
    MB_Relationships_API::each_connected( array(
    	'id'       => 'posts_to_pages',
    	'from'     => $wp_query->posts,
    	'property' => 'connected_pages',
    ) );
    
    MB_Relationships_API::each_connected( array(
    	'id'       => 'posts_to_posts',
    	'to'       => $wp_query->posts,
    	'property' => 'connected_posts',
    ) );

    Here is the code in the content.php file:

    foreach ( $post->connected_pages as $post ) : setup_postdata( $post );
    	the_title();
    endforeach;
    wp_reset_postdata();
    
    echo '<hr>';
    
    foreach ( $post->connected_posts as $post ) : setup_postdata( $post );
    	the_title();
    endforeach;
    wp_reset_postdata();
    in reply to: ✅How to hide group field when post field is empty? #8409
    Anh TranAnh Tran
    Keymaster

    Hi, the problem is your post field ID. On the editing screen, the #post is used for the post form, so you can't use ID post. You need to change the ID of the post field.

    Then, you can hide the group if the field is null with this condition:

    'hidden' => array( 'post2', '=', '' ), // post2 is post field ID.

    PS: Please renew your license to get updates of extensions and support.

    in reply to: Ask about "image_advanced" field. #8385
    Anh TranAnh Tran
    Keymaster

    We’ve just realized this problem and we’re working this.

    PS: It's fixed in the version 1.2.2. Please update.

Viewing 15 posts - 2,416 through 2,430 (of 3,959 total)