Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 2,356 through 2,370 (of 3,708 total)
  • Author
    Posts
  • in reply to: Default Meta Values not working #8643
    Anh TranAnh Tran
    Keymaster

    Hello,

    Do you mean that when getting the field value, if the meta box hasn't been saved yet, the std value is not returned?

    Well, if the meta box hasn't been saved yet, there's actually no values are saved in the post meta. Thus, the helper functions return empty string. Because the helper functions are just the wrap of get_post_meta(), which connects to post meta to get the saved value.

    I'd suggest you do a check to see if the title is empty first.

    The reason we don't set the std when retrieving field value is it's nearly impossible to differentiate a saved empty string (if users really want to save an empty string) to non-saved field value.

    in reply to: Bug with radio buttons inside repeatable group #8641
    Anh TranAnh Tran
    Keymaster

    I see. I fixed that bug 2 weeks ago. I've just released new version of the Meta Box plugin, please update it.

    in reply to: MB Revisions in combination with MB Custom Table #8630
    Anh TranAnh Tran
    Keymaster

    Hello,

    Unfortunately, the MB Revisions doesn't work with MB Custom Table yet. Give us some time to work on that.

    Thanks

    in reply to: Validation w3 Org #8629
    Anh TranAnh Tran
    Keymaster

    Hello,

    That JS part comes from the MB Conditional Logic extension. It uses WordPress's wp_localize_script to output PHP variables to JavaScript. Any code that use wp_localize_script will have similar output, because it's WordPress's behavior. So we can't do anything here.

    Besides, this is not an error, just a warning. In HTML5, to make things short, type attribute is not necessary for script tag, but having it doesn't cause any harm or invalidation.

    in reply to: Bug with radio buttons inside repeatable group #8628
    Anh TranAnh Tran
    Keymaster

    Hello,

    When clone a field or a group, the values of that field or sub-fields will be cleared. This is the expected behavior so users can enter new values in the new cloned fields.

    In case you want to keep a pre-defined value for a field/sub-field, please set 'clone_default' => true for the field/sub-field (in this case, probably is the radio field). This parameter will auto set the std value for new cloned field.

    in reply to: A Strange Problem #8627
    Anh TranAnh Tran
    Keymaster

    Hello, I tested with many active plugins:

    https://imgur.elightup.com/1dHGPHX.png

    in reply to: A Strange Problem #8614
    Anh TranAnh Tran
    Keymaster

    Hello,

    I've just tried your code and don't see that bug. Here is my screenshot: http://prntscr.com/ijfpwy

    The duplicated text looks like the meta box title. Can you check if it's somewhere?

    in reply to: Frustrated - Can't get value of items #8613
    Anh TranAnh Tran
    Keymaster

    Hello, what is the output of print_r( $group_value )? Do you use prefix for group ID?

    in reply to: file_advanced: search option for wp media popup #8612
    Anh TranAnh Tran
    Keymaster

    Hello, I think your trick is the best way to handle that. Because the whole media popup is WP thing, we’re limited by its ability. Until now, I haven’t found a way to auto search like that.

    in reply to: Google Map is not showing marker! #8601
    Anh TranAnh Tran
    Keymaster

    My bad :(. I forgot to update version on extension page. It should be fine now.

    in reply to: meta_query with MB Custom Tables #8600
    Anh TranAnh Tran
    Keymaster

    I'm not sure about this, because the way WordPress build SQL queries from meta query object is very complicated. I'll see if I can do something.

    in reply to: Conditional logic not working with clones in groups #8591
    Anh TranAnh Tran
    Keymaster

    Thanks for letting me know about that. Currently, handling removing images inside the media library is lack. It's kind of complicated. I will try to figure out from the Media Popup code later.

    in reply to: Google Map is not showing marker! #8590
    Anh TranAnh Tran
    Keymaster

    Thanks a lot for your help! This CSS is for making sure inputs do not overflow the column width. I've changed the CSS and updated the plugin. Please let me know how it goes.

    in reply to: Set default value for number field #8584
    Anh TranAnh Tran
    Keymaster

    I've tested and it works for me. Did you add the field for an existing post? The std parameter only works for new posts, or posts that the meta box hasn't saved before. I guess your post has an existing meta box that already saved at least once before. Can you check that?

    in reply to: meta_query with MB Custom Tables #8583
    Anh TranAnh Tran
    Keymaster

    Hi,

    Thanks for the greeting 🙂

    The Custom Table extension hasn't incorporated with the meta query yet. Please use 2 queries to get posts: 1 for getting post IDs from the custom table and one for getting posts. This is the sample code:

    global $wpdb;
    $post_ids = $wpdb->get_col( $wpdb->prepare(
        "SELECT ID FROM your_table
        WHERE obh_note_associated_members LIKE %s",
        $post->post_author
    ) );
    
    $query_args = array (
    	'post_type' =>	'obh_note',
    	'orderby'   =>	'meta_value',
    	'meta_key'  =>	'obh_note_date_time',
    	'order'     =>	'ASC',
    	'post__in'  => $post_ids,
    );
    
    //The query
    $member_notes = new WP_Query( $query_args );
Viewing 15 posts - 2,356 through 2,370 (of 3,708 total)