password.liquid
The password.liquid
template is used to render your online store's password page. This page appears only when you add password protection to your online store. To see what this looks like, you can visit our password-protected demo store.

Template Considerations
Displaying your password message
You can add a custom message to your online store's password page. To output the password message, include the following:
{% unless shop.password_message == blank %}
{{ shop.password_message }}
{% endunless %}
Outputting the password form
To output a form that visitors use to enter your password-protected storefront, initialize the form
tag with the parameter 'storefront_password'
. Within the form, include the following:
- an
input
element with thetype
attribute set topassword
and thename
attribute set topassword
- an
input
element with thetype
attribute set tosubmit
, to submit the form.
Below is an example of a simple password form:
{% form 'storefront_password' %}
{{ form.errors | default_errors }}
<label for="password">Enter store using password:</label>
<input type="password" name="password">
<input type="submit" value="Enter">
{% endform %}
Collecting customer email addresses
You can add an email sign-up form to your online store's password page. This can be useful for building a customer base while getting your Shopify store ready for launch or for capturing store access requests for your wholesale business.
To output a customer sign-up form, initialize the form
tag with the parameter 'customer'
. Within the form, include the following:
- an
input
element with thetype
attribute set tohidden
, thename
attribute set tocontact[tags]
, and thevalue
attribute set toprospect, password page
(Shopify will assist you in marketing to customers created with these tags) - an
input
element with thetype
attribute set toemail
and thename
attribute set tocontact[email]
- an
input
element with thetype
attribute set tosubmit
, to submit the form.
Below is an example of a simple customer sign-up form:
{% form 'customer' %}
{{ form.errors | default_errors }}
{% if form.posted_successfully? %}
<p>Thanks for signing up!</p>
{% else %}
<p>Find out when we open:</p>
<input type="hidden" name="contact[tags]" value="prospect, password page">
<label for="email">Email address</label>
<input type="email" name="contact[email]" id="email" placeholder="Your email">
<input type="submit" value="Submit">
{% endif %}
{% endform %}