Support Forum ยป User Profile

Forum Replies Created

Viewing 15 posts - 3,631 through 3,645 (of 3,958 total)
  • Author
    Posts
  • in reply to: Conditional logic and metabox group issue #2089
    Anh TranAnh Tran
    Keymaster

    Btw, I have just updated MB Conditional Logic ๐Ÿ™‚

    in reply to: Adding unique key to rows #2085
    Anh TranAnh Tran
    Keymaster

    Hi,

    This is a hard question :). I think the filter allows you to change the value of whole group, as the group is the actual field you're filtering. So, $old and $new are arrays (of sub-field values). I guess you're using a cloneable group? If so, then $old and $new are arrays (of clones), each clone is an array of sub-fields.

    Let's try with the code below:

    add_filter('rwmb_GROUP_ID_value', 'prefix_change_value',10,3);
    function prefix_change_value ( $new, $field, $old )
    {
        $text_field_id = 'SUB_FIELD_ID';
        foreach ( $new as $k => $clone )
        {
            $new[$k][$text_field_id] = uniqid();
        }
        return $new;
    }
    in reply to: RW_Meta_Box::is_saved eror #2084
    Anh TranAnh Tran
    Keymaster

    Hi, I see you included the Group extension inside your theme. The extension is the latest version (it has the method is_saved()) but the Meta Box installed on your website is not (the version 4.7.3 has method is_saved()). So, to fix this issue, please:

    - Deactivate the theme first (if the error prevents you from accessing the Dashboard, try changing the theme folder name)
    - Update Meta Box to the latest version
    - Reactivate the theme

    in reply to: Referencing Data from Settings Page #2083
    Anh TranAnh Tran
    Keymaster

    Glad to see you figured it out. To echo nothing if the field is empty, you just need to change the code a little bit:

    <?php
    $field_id = 'twitter-url';
    if ( !empty( $settings[$field_id] ) ) {
        echo '<li><a href=" ' . $settings[$field_id] . '"><i class="fa fa-twitter"></i></a></li>';
    }
    ?>
    in reply to: Referencing Data from Settings Page #2071
    Anh TranAnh Tran
    Keymaster

    Hi, where do you put the code above into your theme? Maybe you should not return the result as you will use it in another way (display it or use as a variable). Using return in a PHP file will stop execution of the following code.

    in reply to: MB Group Activation Error #2064
    Anh TranAnh Tran
    Keymaster

    If it comes with the theme, then you don't need to install the extension as a standalone plugin. Just use it ๐Ÿ˜‰

    in reply to: For file type #2062
    Anh TranAnh Tran
    Keymaster

    Thanks for the error, I will check it.

    The file field, of course, doesn't have good UI. I will search to see if the WordPress media can force users to select files from the computer. If there's a solution for that, I will add to the file_advanced field.

    in reply to: Defining simple validations rules #2061
    Anh TranAnh Tran
    Keymaster

    Hi,

    Yes, that's possible. Just define the validation rules in YAML format.

    in reply to: MB Group Activation Error #2060
    Anh TranAnh Tran
    Keymaster

    The error says the extension is activated twice. Can you check if it is already installed? Maybe included directly in the theme?

    in reply to: Can't add content to Tabs from the Builder #2052
    Anh TranAnh Tran
    Keymaster

    Hi mate,

    Can you please export that meta box and send it to me via email: [email protected] then I can look into it. Also, can you please create another test meta box with tabs? Is this works with new meta box?

    Best regards,

    Tan Nguyen

    in reply to: Conditional logic and metabox group issue #2051
    Anh TranAnh Tran
    Keymaster

    Thanks for your contributing, we're in progress to update this extension ๐Ÿ˜‰ Very appreciated.

    in reply to: For file type #2047
    Anh TranAnh Tran
    Keymaster

    Hi Sinusite,

    You can use native file input with file field. It's the default browser file input, which allows us to select files from computer only.

    in reply to: MB Builder Disappears on Page #2040
    Anh TranAnh Tran
    Keymaster

    Hi cmchahon

    Can you please export that meta box and send to me via email: [email protected]?

    Thank you

    in reply to: MB Builder Disappears on Page #2036
    Anh TranAnh Tran
    Keymaster

    Did you use any of these plugins: Conditional Logic, Show Hide, Include Exclude? Can you please check the conditions to show or hide the meta boxes?

    in reply to: Update field before saving #2029
    Anh TranAnh Tran
    Keymaster

    Glad that you find it! That's the correct way to do that. For more information about hooks, please look at this documentation.

Viewing 15 posts - 3,631 through 3,645 (of 3,958 total)