Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 2,926 through 2,940 (of 3,724 total)
  • Author
    Posts
  • in reply to: email is always required #41248
    PeterPeter
    Moderator

    Hello,

    I run the PHP code on my demo site and do not see that issue, here is the screenshot https://monosnap.com/file/rhqjAvQUExFP6YXFew24az4uNtSKiO

    Do you have any user meta field on your site?

    PeterPeter
    Moderator

    Hello,

    For example, I have a taxonomy field and a taxonomy_advanced subfield in a group field, like this

    $meta_boxes[] = [
        ...
        'fields'   => [
            [
                'name'       => __( 'Taxonomy', 'your-text-domain' ),
                'id'         => 'taxonomy_field',
                'type'       => 'taxonomy',
                'taxonomy'   => ['drink-recipe'],
                'field_type' => 'select_advanced',
            ],
            [
                'name'   => __( 'Group', 'your-text-domain' ),
                'id'     => 'group_field',
                'type'   => 'group',
                'fields' => [
                    [
                        'name'       => __( 'Taxonomy Advanced', 'your-text-domain' ),
                        'id'         => 'taxonomy_advanced_field',
                        'type'       => 'taxonomy_advanced',
                        'taxonomy'   => ['drink-recipe'],
                        'field_type' => 'select_advanced',
                    ],
                ],
            ],
        ],
    ];

    Then the code to set the post term from the taxonomy_advanced field would be:

    add_action( 'rwmb_group_field_after_save_field', function ( $null, $field, $new, $old, $object_id ) {
        $term_id = (int)$new['taxonomy_advanced_field'];  
        wp_set_object_terms( $object_id, $term_id, 'drink-recipe' ); 
    }, 10, 5 );

    This is the example code, if it does not work on your site, please contact us with the link below and request a customization service, our development team will help you to check the issue.
    https://metabox.io/contact/

    in reply to: email is always required #41244
    PeterPeter
    Moderator

    Hello,

    I do not see that issue on my end. Can you please export the field group or generate the PHP code and share it here? You can also try to deactivate all plugins and leave only Meta Box, MB extensions activate, switch to a standard theme of WordPress and check this issue again.

    in reply to: Dynamic Post Title #41243
    PeterPeter
    Moderator

    Hello,

    Please refer to this topic https://support.metabox.io/topic/changing-the-post-title-slug-after-front-end-submissions-based-on-fields/?swcfpc=1
    to update the post title with a custom field value.

    PeterPeter
    Moderator

    Hello,

    Follow the documentation, you can get the post type and post ID from the $object variable. For example:

    add_action( 'rwmb_frontend_after_save_post', 'update_cats_post_title');
    function update_cats_post_title( $object ) {
        $post_type = $object->post_type;
        $post_id = $object->post_id;
        if ( 'cats' == $post_type ) {	
           ...
        }
     }

    https://docs.metabox.io/extensions/mb-frontend-submission/#post-actions

    Let me know how it goes.

    in reply to: Bricks, Metabox, and WPGridbuilder Locator Site #41241
    PeterPeter
    Moderator

    Hello,

    Thank you for your details. In general, I think the issue is not on the side of Meta Box. What Meta Box supports here is a custom post type and custom fields to display on the frontend. I'm not sure what option or feature you are using on your local site to filter the post (location) automatically based on moving the map. I suggest you can contact WP Gridbuilder to ask for help with this issue.

    You can also update the locations in bulk by going to admin area > Location > Bulk select posts > Edit > Just click on Update, see this screenshot https://monosnap.com/file/dzKzxaT4aOBA4GEDBcbJjH12pP6MNE

    PeterPeter
    Moderator

    Hello,

    It's an array of term objects so you need to use a loop to get each term ID. In this case, you can use the sample code to get the author images:

    $images = rwmb_meta( 'tax_image', [ 'object_type' => 'term', 'size' => 'thumbnail' ], $terms[0]->term_id );
    
    in reply to: Type File and validation of MIME types: how does it work? #41231
    PeterPeter
    Moderator

    Hello,

    I also see it does not work on my demo site. I'm asking our development team to check the issue and get back to you later.

    PeterPeter
    Moderator

    Hello,

    >> So, what will be the code in my case?
    You don't need to change the function name, just copy it to your theme or child theme folder. After migrating data, you can delete the code then.

    >> Do I need to write Parent Theme Name or Child Theme Name and how? Should I write WP_Astra or WP Astra while writing the theme name, if it’s parent theme?
    You can add the code to the main theme or child theme, both of them are ok.

    >> The given code at https://metabox.io/move-custom-fields-data-to-custom-tables/ only provides the example for post_type ( companies ) but not for Taxonomies.
    You can change the post type to your post type (tool). But for the taxonomy, the code will be different. Because it is beyond our scope of support to provide a custom code for your specific needs. You can contact us here to request a customization service https://metabox.io/contact/

    in reply to: Progress Stepper Style MB Frontend Submission Form #41228
    PeterPeter
    Moderator

    Hello,

    MB Frontend Submission does not support displaying a multi-step form. You can try to create some custom JavaScript code to show/hide the part of form or tabs when clicking on the next/previous button.

    PeterPeter
    Moderator

    Hello,

    Meta Box does not support a function to get all fields of a field group like that. You can use the function get_post_meta() to get all post meta associated with a post. Please follow the documentation
    https://developer.wordpress.org/reference/functions/get_post_meta/

    PeterPeter
    Moderator

    Hello,

    There is no option to prefill the field value from another field after selecting the Template CPT. You can try to use the action hook rwmb_after_save_post to update the field value (post meta) after saving the post.

    Please follow the documentation https://docs.metabox.io/actions/rwmb-after-save-post/

    in reply to: Beaver Builder image gallery connection to Metabox field #41225
    PeterPeter
    Moderator

    Hello,

    The problem is resolved. The error happens when using the cloneable image_advanced field, it is not compatible with the current version of MB Beaver Themer Intergrator.

    PeterPeter
    Moderator

    Hello,

    Can you please print out the variable $terms to see what value it is stored?

    in reply to: Add Gutenberg editor to category #41218
    PeterPeter
    Moderator

    Hello Jochen,

    I do not understand your question clearly. WordPress does not support using Gutenberg editor to create the category or taxonomy item like in your screenshot. The field wysiwyg also does not support using Gutenberg editor in the field content.

Viewing 15 posts - 2,926 through 2,940 (of 3,724 total)