Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 1,021 through 1,035 (of 3,867 total)
  • Author
    Posts
  • in reply to: Re-order posts not working #47255
    PeterPeter
    Moderator

    Hello Travis,

    You can hover over the dots, drag and drop the post to re-order it. If it doesn't work on your site, please try to deactivate all plugins except Meta Box, MB extension plugins, switch to a WordPress theme and check the issue again.

    Let me know how it goes.

    in reply to: When did ['post_id'] became ['object_id'] in the $config?? #47254
    PeterPeter
    Moderator

    Hello Yasmine,

    Yes, we change post_id to object_id for the frontend form from Meta Box AIO 1.31.0 to support the compatibility between the custom model and frontend form. That means you can submit a custom model entry from frontend.
    You can read more about this update in the changelog https://metabox.io/plugins/meta-box-aio/changelog/
    and documentation https://docs.metabox.io/extensions/mb-frontend-submission/#adding-the-submission-form

    PeterPeter
    Moderator

    Hello,

    Can you please share a screen record of the issue on your site?

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

    Hello,

    If you have two or more custom tables for each field group, you can add all field group IDs to the frontend shortcode and save the field values to all custom tables when submitting or editing the post.

    in reply to: Form data and post size limit #47251
    PeterPeter
    Moderator

    Hello Nick,

    What field type accepts a base64 string? Do you save the field value to a custom table? I think the answer is related to the data type when you create the custom table rather than the field settings.

    in reply to: Conditional Logic Not Working #47250
    PeterPeter
    Moderator

    Hello,

    Is there any chance you read my request above? Please export the field group to a JSON file and share it here, I will help you check the field settings.

    in reply to: Conditional Logic Not Working #47245
    PeterPeter
    Moderator

    Hello Tanja,

    If you are using the builder, please export the field group to a JSON file and share it here. If you use the code to register the custom fields, please share the code also.
    I will help you check the field settings and conditional logic.
    Following the documentation https://docs.metabox.io/extensions/meta-box-builder/#export--import
    https://docs.metabox.io/creating-fields-with-code/

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

    Hello Nick,

    I'm afraid that it isn't possible. As I mentioned above, the column name in the custom table must match the field ID when you register/create the custom field. If you want to save data to separate custom table tables with one frontend form, you can create more field groups and add their IDs to the frontend shortcode.

    [mb_frontend_form id='field-group_id_1,field-group_id_2,field-group_id_3' post_fields='title,content']

    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.

Viewing 15 posts - 1,021 through 1,035 (of 3,867 total)