Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 1,141 through 1,155 (of 3,702 total)
  • Author
    Posts
  • in reply to: Help(dropDown) like on WooCommerce? #14433
    Anh TranAnh Tran
    Keymaster

    Hi,

    Yes, you can do that with MB Settings Page. There's a settings help_tabs for settings pages. See this documentation for details.

    in reply to: Take the PHP and Run? #14432
    Anh TranAnh Tran
    Keymaster

    Hello,

    At the moment, once you take the PHP code and remove the settings from the MB Builder, there's no way to edit the field group.

    In order to do so, I suggest after taking the PHP code, export the field group settings from MB Builder. Then whenever you want to edit the field group, just import it back and edit.

    in reply to: Single metabox on Reciprocal Relationship #14416
    Anh TranAnh Tran
    Keymaster

    Hi Clayton,

    Thanks a lot for your valuable feedback! I didn't think about the 2 identical meta boxes appear on both sides (since it still works).

    I like the idea of adding reciprocal => true to the relationship. It's simple and easy to understand. My additional thought might be we should let users define only one meta box instead of 2. Would you mind helping me on Github?

    Anh TranAnh Tran
    Keymaster

    Hi G.,

    In the latest version of Group, we have improved the settings for group title, so you can simply enter something like this:

    'group_title' => '{#} {field_1} {field_2} Something else'

    I have just updated the docs for that.

    in reply to: Creating a Dashboard #14408
    Anh TranAnh Tran
    Keymaster

    Hi Reinhard,

    Unfortunately, the plugins don't support creating dashboard widgets. Please follow this docs to do so:

    https://codex.wordpress.org/Dashboard_Widgets_API
    https://www.cssigniter.com/make-wordpress-dashboard-widget/
    https://premium.wpmudev.org/blog/adding-custom-widgets-to-the-wordpress-admin-dashboard/

    If you're using Elementor, here is a good tutorial on doing that:

    https://powerpackelements.com/custom-wordpress-dashboard-elementor/

    Anh TranAnh Tran
    Keymaster

    Hi Sergio,

    Please use either of them. The address field, which is used for autocompletion works only with one map. Putting 2 maps will break the code.

    in reply to: Google Map Module Causing Problems #14406
    Anh TranAnh Tran
    Keymaster

    Hi Neil,

    But I was having issues when testing the form… the screen goes blank and eventually times out. Once I remove the map module, the problem goes away immediately.

    Can you give more details about this? Are you testing the form in the back end or front end? Do you see any error in the console? Is the Google Maps API key correct?

    in reply to: Add info box to settings page #14381
    Anh TranAnh Tran
    Keymaster

    Hi Milen,

    That can be done with the Custom HTML field type. I used it a lot in the Demo site. Please take a look.

    Anh TranAnh Tran
    Keymaster

    Hi Sergio,

    I think that can be done with an extra query to the data base:

    • Make a custom query to the custom table to get the ID of the users you want to select:
    global $wpdb;
    $user_ids = $wpdb->get_col( "SELECT ID FROM yourtable WHERE field_1 = 'value_1'" );
    • Then in your options of the user field, set the include param:
    [
    'type' => 'user',
    'query_args' => [
        'include' => $user_ids, // get from above
    ],
    ]
    in reply to: Open Street Map: available fields #14379
    Anh TranAnh Tran
    Keymaster

    Hi Sergio,

    At the moment, we haven't supported OSM for Geolocation extension yet. It was on our plan but we haven't finished it yet. We'll try to do it as soon as we can.

    in reply to: moving to MB custom tables #14378
    Anh TranAnh Tran
    Keymaster

    Hi Dave,

    Please try this script (put it in your functions.php file and go to this URL: yourdomain.com?action=migrate):

    https://pastebin.com/BPXTEy6H

    The idea of the script is:

    • Make sure it runs only when the URL contains ?action=migrate to avoid running the script on every page load.
    • Query all the posts that need to migrate the data. You should modify the query to get your correct posts.
    • For each post, get the old meta value for each field. Note about the value format to see if it's an array or simple string.
    • Insert the values into the new table. If the value is an array, it need to be serialized.

    The script comes directly from my mind without testing, so please check it first.

    Anh TranAnh Tran
    Keymaster

    Hi Sergio,

    There are 2 ways to do that as you already described in your question:

    1. Set the rule for each field in the meta box B, or
    2. Set the rule for the whole meta box B.

    I think the 2nd solution is better and cleaner. This rule should be put in the settings of the meta box B:

    'hidden' => array( 'radio_field_id', '=, 'radio_1' ),

    The rule should specify the field ID, not the meta box ID (since the meta box is just a wrap of fields).

    in reply to: Image in Group #14376
    Anh TranAnh Tran
    Keymaster

    Hi William,

    It's necessary to check if a group has sub-values for title and image. Please try this code:

    <?php
    $product_colour = rwmb_meta( 'product-colour' ); // ID of the group
    if ( ! empty( $product_colour ) ) {
        if ( ! empty( $product_colour['title'] ) ) {
            echo '<h3>', $product_colour['title'], '</h3>';
        }
        if ( ! empty( $product_colour['image'] ) ) {
            $image = RWMB_Image_Field::file_info( $product_colour['image'], ['size' => 'thumbnail'] );
            echo '<img src="', $image['url'], '">';
        }
    }
    ?>
    in reply to: Problem when using Groups with Tabs #14375
    Anh TranAnh Tran
    Keymaster

    Hi Neil,

    I've just answered you in another topic. The rule here is: you can add only one tab navigation, no nesting tabs. But for groups, you can add as many groups with any nesting level.

    To make things cleaner on the edit screen, I'd suggest using collapsible groups.

    in reply to: Ignore saved state on REST API #14374
    Anh TranAnh Tran
    Keymaster

    Due to the nature of group, a private key is the only way I found to store the current state of a collapsible group, especially with nested groups.

    I'll make a commit for the REST API extension to strip it from the output.

    Update: the fix is available in the version 1.3.4.

Viewing 15 posts - 1,141 through 1,155 (of 3,702 total)