Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 1,786 through 1,800 (of 3,708 total)
  • Author
    Posts
  • in reply to: Std value is missing with disabled set to true #11336
    Anh TranAnh Tran
    Keymaster

    Hi Hazmi,

    Can you please check again? I've just tested on my localhost and the std value is not saved, no matter the value is, when the disabled attribute is set to true.

    Here is my video:

    http://recordit.co/29FjNuuQAU

    in reply to: Std value is missing with disabled set to true #11323
    Anh TranAnh Tran
    Keymaster

    Hi Hazmi,

    When you set a field disabled, its value won't be submitted. Thus, there's no value saved. Please see this answer on Stack Overflow for more info.

    in reply to: Revision of checkbox does not show content #11322
    Anh TranAnh Tran
    Keymaster

    Hi,

    Thanks for your feedback. I've checked the plugin and found a bug from the previous version that prevents the fields showing in the comparison screen. I've just pushed a fix to the plugin. Please update it.

    Thanks,
    Anh

    in reply to: Select advanced load remote data #11317
    Anh TranAnh Tran
    Keymaster

    Hello guys,

    Finally, I got something that works:

    Please checkout the select2-ajax branch and see the demo file here.

    Anh TranAnh Tran
    Keymaster

    Hi Denny,

    The code should be like this:

    add_filter( 'rwmb_site_name_field_meta', 'your_filter_function', 10, 3 );
    function your_filter_function( $meta, $field, $saved ) {
        return 'Title here';
    }

    or

    add_filter( 'rwmb_field_meta', 'your_filter_function', 10, 3 );
    function your_filter_function( $meta, $field, $saved ) {
        if ( 'site_name' != $field['id'] ) {
            return $meta;
        }
        return 'Title here';
    }
    Anh TranAnh Tran
    Keymaster

    Hi Denny,

    Looks like it can be done with rwmb_field_meta filter (https://docs.metabox.io/filters/#rwmb_field_meta). This filter changes the value before showing to users, e.g. it changes the value get from the database. It might be what you want.

    Cheers,
    Anh

    in reply to: Set meta value of custom user field programmatically #11305
    Anh TranAnh Tran
    Keymaster

    Hi Mauro,

    update_user_meta is the way to go. Glad that you found it!

    in reply to: Change Destination Of Custom File Upload Field Type #11304
    Anh TranAnh Tran
    Keymaster

    Hi Lucjan,

    Sorry for the delay. This feature was asked before in the forum and we haven't done it yet. We'll let you know when it's ready.

    Thanks,
    Anh

    in reply to: Possible to get isolated address items for frontend display? #11297
    Anh TranAnh Tran
    Keymaster

    Hi,

    You need to create a new text field, and bind it to the city data. Please follow the documentation to know how to do that.

    in reply to: Show translated content #11283
    Anh TranAnh Tran
    Keymaster

    Hi Ale,

    To get the values in an array, you have to use rwmb_meta or rwmb_get_value. Then parse the field options to output the labels:

    $field_id = 'mb_languages';
    $field = rwmb_get_field_settings( $field_id );
    $options = $field['options'];
    
    $values = rwmb_meta( $field_id );
    foreach ( $values as $value ) {
        echo $options[$value]; // Label
    }
    in reply to: After the Beaver add-on, any chance of an Elementor one? #11280
    Anh TranAnh Tran
    Keymaster

    Hello guys,

    Sorry for the delay. We've completed the integration plugin and it's available on Github. We're submitting it to wordpress.org.

    The code is also sent and verified by Elementor's developer Ohad Raz, so I think it's ready to use.

    Please try it and let me know if you need anything. Details, docs and video are coming soon.

    in reply to: Select taxonomy field is not working from version 4.15.4 #11269
    Anh TranAnh Tran
    Keymaster

    Thanks a lot! I have refactored the code and forgot to keep that check. It's now has been fixed.

    in reply to: Show translated content #11267
    Anh TranAnh Tran
    Keymaster

    Hi Ale,

    This is a great question!

    Firstly, I think you should translate the field labels only. Translating the values makes it's very hard to control what is saved in the database. And the data in the database should not be user's concern, it's for developers only.

    Secondly, if you use rwmb_meta, you'll get the field value stored in the database. It's static and can't be changed. That's why you don't see the translated text. I'd suggest using rwmb_the_value to get the option labels, which meaningful to users and translatable. See the field documentation for details.

    Finally, make sure you load the text domain for the code of meta boxes.

    in reply to: Group items not showing up #11266
    Anh TranAnh Tran
    Keymaster

    Can you send me an temporary admin account to check the bug? Please send via contact form.

    Anh TranAnh Tran
    Keymaster

    Hi Philip,

    Please add show parameter to the meta box settings as follows:

    function testmeta( $meta_boxes ) {
        $prefix = 'swed-';
    
        $meta_boxes[] = array(
            'id' => 'vendoroptions',
            'title' => esc_html__( 'Vendors', 'metabox-online-generator' ),
            'post_types' => array( 'page' ),
            'context' => 'after_title',
            'priority' => 'high',
            'autosave' => false,
            'show' => array(
                'template' => array( 'this-template.php' ),
            ),
            'fields' => array(),
       );
       return $meta_boxes;
    } );

    For more details, please see the documentation.

Viewing 15 posts - 1,786 through 1,800 (of 3,708 total)