Custom Register Form - Show/hide password on password fields?
Support › MB User Meta › Custom Register Form - Show/hide password on password fields?
- This topic has 6 replies, 2 voices, and was last updated 1 year, 11 months ago by
Codog.
-
AuthorPosts
-
January 4, 2024 at 8:39 PM #44216
Codog
ParticipantHi 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 🙂
January 4, 2024 at 10:39 PM #44219Peter
ModeratorHello,
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 ]January 4, 2024 at 10:49 PM #44220Codog
ParticipantHi 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 🙂
January 5, 2024 at 7:48 PM #44226Peter
ModeratorHello,
It isn't possible. You need to keep the field user_pass2 to make the check password strength function work properly.
January 5, 2024 at 9:22 PM #44229Codog
ParticipantHi 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 🙂
January 6, 2024 at 6:35 PM #44235Peter
ModeratorHello,
I will inform the development team to consider supporting this case in future updates.
Thank you.
January 6, 2024 at 6:46 PM #44236Codog
ParticipantThanks Peter 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.