Hi,
I am using default spotlight theme and want to add a show password feature in my login and sign up page. The links to the pages are mentioned below:
A Shopify store owner using the Spotlight theme wants to add a âshow passwordâ toggle feature to login and signup pages.
Solution Provided:
Follow-up Issue:
The user successfully implemented the feature but needed help with alignmentâthe âshow passwordâ checkbox wasnât positioned directly below the password field.
Alignment Fix:
<div> element with class âshow-password-wrapperâtop and left values to control spacingNote: One user mentioned needing to use the ârenderâ feature instead of âincludeâ for the snippet to work properly.
The discussion reached a resolution with the feature working successfully after alignment adjustments.
Hi,
I am using default spotlight theme and want to add a show password feature in my login and sign up page. The links to the pages are mentioned below:
Hello @Abhishek_Singh ,
I am Gina from flareAI app - free sales machine, and I am here to support you.
To add a show password feature to the login and sign-up page of your Shopify store using the default Spotlight theme, you can follow these steps:
Open your Shopify Admin Panel and go to the Online Store section.
Click on the Actions dropdown menu and select Edit code.
In the left-hand sidebar, navigate to the Snippets folder and click on the Add a new snippet button.
Name the new snippet âshow-password.liquidâ and paste the following code into the file:
Show password
Save the new snippet.
In the left-hand sidebar, navigate to the Templates folder and click on the customers/login.liquid file.
Find the password input field and add the following code after it:
{% include 'show-password' %}
Save the customers/login.liquid file.
Repeat steps 6-8 for the customers/register.liquid file.
Preview your store and test the show password feature on the login and sign-up pages.
This code will add a âShow passwordâ checkbox next to the password input field on the login and sign-up pages of your Shopify store. When the checkbox is checked, the password field will display the password in plain text, allowing the user to verify that they have entered it correctly. When the checkbox is unchecked, the password field will display masked characters, as usual.
Let me know if you have any further questions.
Gina
Hi @flareAI ,
Definitely it is working
. But can you also help me to align it right. See how it is looking:
https://ausfin.in/account/login
https://ausfin.in/account/register
I want to align it just below the password box.
Also instead of customers/login.liquid file in templates. I pasted the code {% include âshow-passwordâ %} in main-login.liquid & main-register.liquid in sections in spotlight theme and it worked.
Hey @flareAI ,
Are you still there, as Iâm trying to say that if you can help me to align the âshow passwordâ button just below the password box. Here are the links:
https://ausfin.in/account/login
https://ausfin.in/account/register
Thanks Bro ![]()
Hi @Abhishek_Singh ,
Happy to hear it worked!
To make the âShow Passwordâ checkbox or toggle button appear just below the password text field, you can wrap them in a div element and use CSS to position it accordingly.
Hereâs an example:
Show password
.show-password-wrapper {
position: relative;
}
.show-password {
position: absolute;
top: calc(100% + 5px);
left: 0;
}
Adjust the top value to control the distance between the password field and the âShow Passwordâ checkbox or toggle button. You can also adjust the left value to change its horizontal position.
Hope this helps
Gina
It works! Thanks, however I had to use the ârenderâ feature instead of âincludeâ