Support Forum
Support › MB User Profile › Duplicate confirmation message when you have multiple mb_user_profile_info on onResolved
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
Any update on this? I am having the same issue.
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.
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."]'); ?>
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