# customers/reset_password

> The customers/reset_password template of a Shoplazza Theme renders the password reset form, and links to the Ajax API password reset endpoint it submits to.

The `customers/reset_password` template renders the password reset page, which hosts the form to reset the password for a **customer account**.

For the parameters and the response of the endpoint this form submits to, see [`PATCH /{locale}/api/customers/password_reset`](/docs/theme/references/ajax-api/customer#patch-localeapicustomerspassword_reset).

## Location

The `customers/reset_password` template is located in the `templates` > `customers` directory of the theme:

```text title="Directory"
└── theme
    ├── layout
    ├── templates
    |   └── customers
    |     ├── reset_password.liquid
    |     ...
    ...
```

## Content

You should include the [password reset form](./customers-reset-password#the-password-reset-form) in your `customers/account` template or a section inside of the template.

### The password reset form

The password reset form can be added to the [form](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form). Within the form tag block, you need to include the following:

| Input                 | type       | name               |
| :-------------------- | :--------- | :----------------- |
| Email                 | `text`     | `email`            |
| Verification code     | `text`     | `code`             |
| Password              | `password` | `password`         |
| Password confirmation | `password` | `confirm_password` |

For example:

```html title="Example"
<form method="POST" action="{{ '/api/customers/password_reset_email' | add_root_url }}">
  <div>
    <input id="email" name="email" type="text" required pattern="[a-zA-Z0-9!#$%&'*+\\/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+\\/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?">
    <label for="email">Email</label>
  </div>
</form>

<form method="PATCH" action="{{ '/api/customers/password_reset' | add_root_url }}">
  <input name="email" type="hidden">
  <div>
    <input id="code" name="code" type="text" maxlength="6" required>
    <label for="code">Verification code</label>
  </div>
  <div>
    <input id="password" name="password" type="password" minlength="6" maxlength="16" pattern="[\s\S]{6,16}" required>
    <label for="password">Password</label>
  </div>
  <div>
    <input id="confirm-password" name="confirm_password" type="password" minlength="6" maxlength="16"
      pattern="[\s\S]{6,16}" required>
    <label for="confirm-password">Confirm password</label>
  </div>
  <button type="submit">Confirm</button>
</form>
```
