Duplicate confirmation message when you have multiple mb_user_profile_info on on

Support MB User Profile Duplicate confirmation message when you have multiple mb_user_profile_info on onResolved

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #13728
    Infolu OfficialInfolu Official
    Participant

    Hello everyone, I'm using the user profile front end and I noticed that when I have several boxes, when updating any of them, the confirmation message appears duplicated for each mb_user_profile_info, is there any way to display the confirmation message only for the mb_user_profile_info that I click on submit?
    https://imgur.com/gERNjkf

    Exemple

    #21514
    Johannes GrossJohannes Gross
    Participant

    Any update on this? I am having the same issue.

    #21519
    Long NguyenLong Nguyen
    Moderator

    Hi,

    If you have several meta boxes and display on one user profile page, please use the attribute id with meta box ids and commas instead of using more shortcodes on one page.

    Current case:

    [mb_user_profile_info id="meta-box-id1" submit_button="Submit" confirmation="Your information has been successfully submitted. Thank you."]
    
    [mb_user_profile_info id="meta-box-id2" submit_button="Submit" confirmation="Your information has been successfully submitted. Thank you."]
    

    Recommend:

    
    [mb_user_profile_info id="meta-box-id1, meta-box-id2" submit_button="Submit" confirmation="Your information has been successfully submitted. Thank you."]
    

    For more information, please follow this documentation https://docs.metabox.io/extensions/mb-user-profile/#edit-profile-form.

    #21561
    Johannes GrossJohannes Gross
    Participant

    That makes sense. However, when I tried it, this also require the logged in user to also write in their password (twice) to be able to update their e.g. first name.

    <?= do_shortcode('[mb_user_profile_info id="twt-public-profile" form_id="twt-edit-profile" label_submit="Update Profile" confirmation="Your profile has been updated successfully. Thank you."]'); ?>
        <h2>Set a New Password</h2>
        <?= do_shortcode('[mb_user_profile_info id="rwmb-user-info" password_strength="very-weak" label_submit="Update Password" confirmation="Your password has been updated. Thank you."]'); ?>
    #21564
    Long NguyenLong Nguyen
    Moderator

    Hi,

    By default, two password fields mark as required. We can use the filter hook rwmb_profile_info_fields to remove this HTML attribute.

    add_filter( 'rwmb_profile_info_fields', function( $fields ) {
        $fields['password']['required'] = false;
        $fields['password2']['required'] = false;
        return $fields;
    } );
    

    Find more form filter hooks in the file wp-content/plugins/mb-user-profile/src/DefaultFields.php

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.