Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 886 through 900 (of 3,724 total)
  • Author
    Posts
  • in reply to: Custom Fields and jQuery Validation #47234
    PeterPeter
    Moderator

    Hello,

    Please share your site admin account by submitting this contact form https://metabox.io/contact/
    I will take a look.

    in reply to: Generate checkbox list choices with callback #47233
    PeterPeter
    Moderator

    Hello,

    I understand the issue. It is related to this topic https://support.metabox.io/topic/dynamically-populate-the-options-of-a-select-custom-field-base-on-global-cf/

    you need to use the WordPress function get_option() to get the settings page value (like the theme option) when creating the custom field. At this point, the helper function rwmb_meta() doesn't work.

    Here is an example

    function test_function() {
        $options = get_option( 'custom-options' );
        $value_a = $options['test_a'];
    
        $optionsA = array(
            '1' => 'Apple',
            '2' => 'Orange'
        );
    
        $optionsB = array(
            '3' => 'Cat',
            '4' => 'Dog'
        );
    
        return $value_a ? $optionsA : $optionsB;
    }

    If you use the builder, you will need to re-update the field group to update the choice for the field test_b.

    in reply to: Model Search with Parent Permission Error #47231
    PeterPeter
    Moderator

    Hello Johannes,

    Thank you for your feedback.

    I can reproduce the issue on my site and I've escalated the issue to the development team to fix this. I will get back to you when I have more information.

    in reply to: Generate checkbox list choices with callback #47226
    PeterPeter
    Moderator

    Hello,

    Please ensure the option name is added to the helper function, and the separator should be underscore instead of dash. For example custom_options

    
    $value_a = rwmb_meta( 'test_A', array( 'object_type' => 'setting' ), 'custom_options' );
    

    Following the documentation https://docs.metabox.io/extensions/mb-settings-page/#using-code

    After you save the field test_a value, the $optionsA will be returned.

    in reply to: Field pull custom table row data #47225
    PeterPeter
    Moderator

    Hello Nick,

    If you want to use the existing table to store the field value, please follow the documentation https://docs.metabox.io/extensions/mb-custom-table/#using-existing-tables

    notice the column name must match the field ID when you register/create the custom field.

    in reply to: Custom Fields and jQuery Validation #47224
    PeterPeter
    Moderator

    Hello Nick,

    I create a custom field type following the documentation https://docs.metabox.io/creating-new-field-types/

    and I can use the jQuery validation, frontend filter validation properly. Here is the example code:

    add_filter( 'rwmb_meta_boxes', function ( $meta_boxes ) {
        $meta_boxes[] = [
            'title'      => 'Profile',
            'id'         => 'post-profile',
            'post_types' => 'post',
            'fields'     => [
                [
                    'name' => 'Hotline',
                    'id'   => 'hotline',
                    'type' => 'phone',
                    
                ],
            ],
            'validation' => [
                'rules'  => [
                    'hotline' => [
                        'required'  => true,
                        'minlength' => 7,
                    ],
                    // Rules for other fields
                ],
                'messages' => [
                    'hotline' => [
                        'required'  => 'hotline is required',
                        'minlength' => 'hotline must be at least 7 characters',
                    ],
                    // Error messages for other fields
                ],
            ],
        ];
    
        return $meta_boxes;
    } );
    
    add_filter( 'rwmb_frontend_validate', function( $validate, $config ) {
        // Check if users have selected files for an image upload field.
        if ( empty( $_POST['hotline'] ) ) {
            $validate = 'Please add a phone number';
        }
        return $validate;
    }, 10, 2 );
    in reply to: Generate checkbox list choices with callback #47220
    PeterPeter
    Moderator

    Hello Yumiko,

    Can you please share more details of the issue on your site? Because I don't know what exactly the issue is. Let me know the callback function, other field values, settings page ... and screenshots of them.

    in reply to: mb_blocks_preview not working #47215
    PeterPeter
    Moderator

    Hello metafan,

    I'm sorry about this experience but it isn't solved. I will let you know when this event is added back to the MB Blocks plugin.

    in reply to: rwmb_frontend_validate & Field data #47212
    PeterPeter
    Moderator

    Hello Nick,

    The filter rwmb_frontend_validate doesn't pass the field settings to the callback function. You can use the helper function rwmb_get_field_settings to get the field settings.
    Please follow the documentation https://docs.metabox.io/functions/rwmb-get-field-settings/

    in reply to: Where To Get Metabox AIO Files #47210
    PeterPeter
    Moderator

    Hello,

    You can go to the My Account page, login to your account and download the Meta Box extension plugins to install it on your site manually. Please check this screenshot https://imgur.com/0M047T7

    in reply to: Squirrly SEO and ACF to custom Schemas #47209
    PeterPeter
    Moderator

    Hello Jorge,

    I don't see any specific settings or an addon plugin when they use ACF to create custom fields for Squirrly so I think it will work with Meta Box. Can you try to create the same field ID and see if it works?

    PeterPeter
    Moderator

    Hello,

    If you use the MB frontend shortcodes to show the form and dashboard in the frontend without using Bricks, do they work on your site? Please follow the documentation
    https://docs.metabox.io/extensions/mb-frontend-submission/
    I think the issue arises from the Bricks element itself, not from Meta Box.

    in reply to: Category Image Slider Not Displaying on website #47207
    PeterPeter
    Moderator

    Hello Jacques,

    You had a similar issue in the past, here is the topic https://support.metabox.io/topic/dont-know-where-the-settings-are-and-no-longer-working-upon-upgrading/

    I already replied to this issue in the ticket system:

    I'm not able to edit the theme file on your test site. But I suggest you check two files that get the slider option of the category and show the HTML elements.
    /wp-content/themes/thrill/partials/header/title.php
    /wp-content/themes/thrill/includes/title.php
    
    or contact your developer who creates this custom theme and ask them to check the issue for you.

    Can you please recheck the file that I suggested?

    in reply to: The custom field blank in admin dashboard #47199
    PeterPeter
    Moderator

    Hello Neha,

    Do you try to switch the theme to a WordPress theme also? If you still cannot edit a field group, please share your site admin account by submitting this contact form https://metabox.io/contact/
    I will take a look.

    in reply to: MB Custom Posts With No Custom Fields are Blank Pages In Edit #47195
    PeterPeter
    Moderator

    Hello Brent,

    The custom fields when editing a CPT are displayed properly on my site, screenshot https://imgur.com/AARZKaW

    Please try to clear all caches (plugin, browser, hosting ...) then deactivate all plugins except Meta Box, MB AIO, switch to a WordPress theme and check the issue again.

Viewing 15 posts - 886 through 900 (of 3,724 total)