Support Forum
Support › MB User Meta › Custom Register Form - Show/hide password on password fields?
Hi there,
I have created a custom Registration Form using your 'rwmb_profile_register_fields' filter hook and all works well. I have added the password fields like so...
.....
'password' => [
'name' => __( 'Password', 'text-domain' ),
'id' => 'user_pass',
'type' => 'password',
'required' => true,
'desc' => '<span id="password-strength" class="rwmb-password-strength"></span>',
'attributes' => [
'autocomplete' => 'new-password'
]
],
'password2' => [
'name' => __( 'Confirm Password', 'text-domain' ),
'id' => 'user_pass2',
'type' => 'password',
'required' => true,
],
.....
However, when adding these password fields the "Show/Hide" password "eye icon" is no longer available to the user? Is there an attribute or method to keep this functionality on these fields when creating a custom registration form?
Many thanks 🙂
Hello,
Please try to add the setting 'append' => '<i class="password-icon show-icon"></i>',
to the password field to display the show/hide icon.
'password2' => [
'name' => __( 'Confirm Password', 'mb-user-profile' ),
'id' => 'user_pass2',
'type' => 'password',
'required' => true,
'append' => '<i class="password-icon show-icon"></i>', //here
]
Hi peter,
thanks for the prompt response.
That worked perfectly 🙂
Final Question (Regarding password field)
===========================================
Is there any way to 'Remove' the 'confirm password' field (user_pass2) but still maintain the strength password meter functionality in the primary password field (user_pass). It does not seem to function once the 'confirm password' is removed?
Thanks 🙂
Hello,
It isn't possible. You need to keep the field user_pass2 to make the check password strength function work properly.
Hi Peter,
thanks for your response.
It would be really great to have the option to turn off the confirmation password - In UXD forcing users to confirm their password has been known to reduce registration conversion rates significantly!
Could this be considered as a future improvement?
Thanks 🙂
Hello,
I will inform the development team to consider supporting this case in future updates.
Thank you.
Thanks Peter 🙂