Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

Show password while you are typing it on the “my account” login page

I would strongly disagree to show the password as the user typing it.
You could instead implement a way to show the status of the field with a user action like a user click to show password or on hover.
The reason is that the user makes the decision to show the password. Also, improve the security as maybe the users are not alone when they typing it

Some examples are:
enter image description here
Code from herdiansc

//Place this plugin snippet into another file in your applicationb
(function ($) {
    $.toggleShowPassword = function (options) {
        var settings = $.extend({
            field: "#password",
            control: "#toggle_show_password",
        }, options);

        var control = $(settings.control);
        var field = $(settings.field)

        control.bind('click', function () {
            if (control.is(':checked')) {
                field.attr('type', 'text');
            } else {
                field.attr('type', 'password');
            }
        })
    };
}(jQuery));

//Here how to call above plugin from everywhere in your application document body
$.toggleShowPassword({
    field: '#test1',
    control: '#test2'
});

jsfiddle

And
user Baraka Mahili

$('#show_password').hover(function functionName() {
                        //Change the attribute to text
                        $('#password').attr('type', 'text');
                        $('.glyphicon').removeClass('glyphicon-eye-open').addClass('glyphicon-eye-close');
                    }, function () {
                        //Change the attribute back to password
                        $('#password').attr('type', 'password');
                        $('.glyphicon').removeClass('glyphicon-eye-close').addClass('glyphicon-eye-open');
                    }
                );

Related Posts:

  1. Email Woocommerce customer a link to login and set a password for their automatically created account
  2. How to disable Woocommerce password recovery and use the default WordPress password reset page?
  3. WooCommerce changes lost password reset link
  4. WooCommerce lost password reset flow not working with SendGrid (redirect loop)
  5. Which hook should I use to capture $_POST(‘password’) via profile update and password reset
  6. Allow WooCommerce existing customers to checkout without being logged in [closed]
  7. WooCommerce: “account is already registered with your email address”
  8. Woocommerce password Reset
  9. Why is my WordPress login credentials missing, but work with WooCommerce?
  10. lost password link not working for my site
  11. password_reset doesnt work
  12. Clients with empty username are not receiving request new password email
  13. wordpress/woocommerce login url not redirecting correctly
  14. Show notice to user based on User Meta
  15. Change password notification email
  16. How to change lost password email text using custom plugin wordpress?
  17. Temporary access to page with URL sent to email
  18. Forgot password flow does not work, getting email with a link but after clicking link it’s not working
  19. Change wp-login.php? Problem with .htaccess password protection and multi user shop
  20. Users credentials and syncing from third party with WooCommerce
  21. If YITH Wishlist page is set to the WooCommerce my-account endpoint, the endpoints stop working all together. Any solution?
  22. Login page so wide [closed]
  23. Hide/show button for the password field in the Woocommerce My Account page
  24. Woocommerce – Add a product to cart programmatically via JS or PHP [closed]
  25. ( Woocommerce) How to get the user belonging to an order? [closed]
  26. Get the product list of a given Category ID
  27. List of JS events in the WooCommerce frontend
  28. get woocommerce My account page link
  29. WooCommerce: How to edit the get_price_html
  30. Get woocommerce product price by id [closed]
  31. Product categories don’t appear as option to build menu
  32. WooCommerce Variable Product Price not showing on single product page
  33. How to override WooCommerce template files?
  34. Woocommerce add extra field to variation product
  35. Getting the gallery images from products in woocommerce?
  36. How to get current product category ID in product archive page
  37. Get url of product’s images (woocommerce)
  38. WooCommerce prices location in DB
  39. Order by rating not works in wp_query
  40. Woocommerce: How to remove page-title at the home/shop page but not category pages
  41. Woocommerce show cross sells on singe product page [closed]
  42. How to add a new endpoint in woocommerce
  43. Are there any hook or filter when refund is done through admin -woocommerce
  44. How to check if is in cart page? [closed]
  45. Display single product attribute value on Shop page (Woocommerce)
  46. WP/WooCommerce REST API cart/checkout/order [closed]
  47. how to use wc_create_order with subscription product
  48. WooCommerce: Webhook disabled on its own
  49. Share users and WooCommerce memberships between two installations
  50. Slow Loading Attribute Select – WooCommerce Backend
  51. WooCommerce: Can’t use wc_get_products for custom REST API endpoints
  52. How to change or add Woocommerce thank you page URL key content?
  53. How can I define a custom template for woocommerce [products] shortcode? [closed]
  54. How to remove an action within a class with extends
  55. single-product.php template not working for single products [closed]
  56. Insert variations via woocommerce api [closed]
  57. WooCommerce get physical store address
  58. Is it possible to add custom fields to a WooCommerce attribute term? [closed]
  59. wc_get_template_part( ‘content’, ‘product’ ) | Where is this file located?
  60. how to get woocommerce product attribute slug
  61. Correct function to get the user’s latest Woocommerce Subscription?
  62. Move payment options at checkout in WooCommerce [closed]
  63. add_filter to modify woocommerce_cart_item_name hyperlink
  64. Where do the cart details are stored in database?
  65. How to display product price of the product in loop
  66. Display order items names in WooCommerce admin orders list [closed]
  67. Is it safe to delete from db orphaned posts i.e. whose post_parent no longer exists?
  68. Add custom variable to cart content [closed]
  69. Get product details by url key in WordPress woocommerce
  70. Get product link
  71. WooCommerce – Hook after Loading Variation in Admin Edit page?
  72. How to delete woo commerce order pragmatically? [closed]
  73. Process checkout using WC REST API
  74. How to get rid of the hover zoom in WooCommerce single products
  75. How do I display certain products via their category on a section of a page using PHP?
  76. How to turn off WooCommerce user registration and manually create accounts?
  77. What’s the difference between WC() and $woocommerce
  78. Display orders instead of woocommerce my account dashboard for logged in users [closed]
  79. Limit users to one active subscription in WooCommerce Subscriptions? [closed]
  80. Detect whether a page is a product subcategory page?
  81. Hidden woocommerce products still showing up in search results [closed]
  82. Menu not show woocommerce product category
  83. Orders being sent to wrong admin email in WooCommerce [closed]
  84. WooCommerce: add different order item meta for each item in order
  85. Remember page before login page, redirect to that page after login
  86. Woocommerce 3.1 Add product image to order confirmation email not working
  87. Where is the “default attribute” values located in the phpMyAdmin in Woocommerce?
  88. Woocommerce My Account Endpoint – how to get ID parameter from URL?
  89. Hook and send Woocommerce data after click Place Order button
  90. Woo-commerce | Disable proceed to checkout button in cart page if total in cart less than 15 [closed]
  91. Fatal Error when installing woocommerce despite upgrading
  92. Adding an action within a function that is being called by add_filter
  93. WooCommerce conditional meta query
  94. Default woocommerce placeholder image
  95. How to build a plugin that supports authenticated POST requests to the REST API from external servers?
  96. Hide certain tags on Product Edit tag cloud
  97. WooCommerce: Add New Report Tab
  98. WooCommerce Change Product Global Attribute Value via CRUD for Simple Product [closed]
  99. How to get values from woocommerce admin input fields?
  100. Show only geolocated user country into Woocommerce checkout country fields
Categories woocommerce-offtopic Tags account, password, woocommerce-offtopic
The best way to display taxonomies
Select two value from meta key and post meta

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Post Navigation Elementor
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • WPFacet multiple loop displaying duplicate content
  • Get the name of the template/*html file used
  • Fix: WordPress.DB.PreparedSQL.NotPrepared Plugin Check (PCP)
  • Removing unnecessary CSS and JS code from wp_head()
  • hexagonal image gallery. Am I on the right track? [closed]
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress