Shopify: How to add a "Show password" box on the login page

Shopify: How to add a "Show password" box on the login page

Customers / login.liquid

Head into the template: customers / login.liquid and look for "customer.login.password".

customer.login.password

Below the password input add: Show password

checkbox

Theme.js

Dance theme.js, add everything at the end:

function myFunction() { var x = document.getElementById ("CustomerPassword");  if (x.type === "password") { x.type = "text"; } else { x.type = "password"; } }

theme.jsWhich will give you this: 

result

Back to blog

Leave comments

Veuillez noter que les commentaires doivent être approuvés avant d'être publiés.

1 de 2