User:Forgot_Password_Form Tag

This tag is used to create a "forgot my password" form for your users.


Users will enter their email address in the form and, upon submitting, an email will be sent with a link to create a new password.

Unless you set a redirect parameter, the user will be redirected back to the same page after submitting, and the success variable will allow you to show a success message.


{{ user:forgot_password_form reset_url="/reset-password" }}

    {{ if errors }}
        <div class="bg-red-300 text-white p-2">
            {{ errors }}
                {{ value }}<br>
            {{ /errors }}
    {{ /if }}

    {{ if success }}
        <div class="bg-green-300 text-white p-2">
            {{ success }}<br>
    {{ /if }}

    <input type="text" name="email" value="{{ old:email }}" />

    <button type="submit">Send Reset Email</button>

{{ /user:forgot_password_form }}

The email will contain a link to the URL specified in the reset_url parameter, along with extra query parameters. On that URL you must have a user:reset_password_form tag to finish the task and let the user set their new password.

The user needs to be logged out for this tag to do anything. You may want to wrap the form in {{ if logged_out }}{{ /if }}.

The email

Once the form is submitted, an email will be sent containing the URL for resetting the password.

This email is bundled with Statamic and will work for most people out of the box. However, if you’d like to customize it, you can.

The template is named user-reset and should contain a {{ reset_url }} variable, which is the generated reset URL.


redirect string

Where the user should be taken after requesting a password reset.

error_redirect string

The same as redirect, but for failed password reset requests.

allow_request_redirect boolean

When set to true, the redirect and error_redirect parameters will get overridden by redirect and error_redirect query parameters in the URL.

reset_url string

The URL containing your Reset Password Form. A link to this URL will be included in the email, along with the appropriate query parameters.

HTML Attributes

Set HTML attributes as if you were in an HTML element. For example, class="required" id="forgot-password-form".


Variable Type Description



An array of validation errors.



An array of previously submitted values.



A success message.



An alias of the success variable.

Betterify this page on Github!