ExpressionEngine Docs

Forgot Password Form Tag

Overview

Output a forgotten password form that sends an email with instructions for resetting a member password when unable to login.

{exp:member:forgot_password_form}

        <label>Your Email Address</label><br />
        <input type="email" name="email" value="" maxlength="120" size="40" />

        <input type="submit" name="submit" value="Submit" />

{/exp:member:forgot_password_form}

Parameters

error_handling=

error_handling="inline"

Choose to display error messages inline . By default, errors are displayed with the user message template.

password_reset_email_template=

password_reset_email_template="member/email-password-reset"

password_reset_url=

password_reset_url="member/reset-password"

return=

return="member/forgot-password/sent"

Form Inputs

Email

Member email address. This is a required field:

<label for="email">Email</label>
<input type="email" name="email" value="" maxlength="120" size="40" />

Variable Pairs

{errors}

Form submission errors are displayed using a “looping pair” as there can be more than 1 error in a form submission.

{errors}
    <p>{error}</p>
{/errors}

Error Tag Pair Parameters

backspace=
backspace="3"

The backspace= parameter will remove characters, including spaces and line breaks, from the last iteration of the tag pair.

Error Tag Pair Variables

{error}
{error}

The error text.

Example

{exp:member:forgot_password_form
    return="member/forgot-password/sent"
    error_handling="inline"
    password_reset_url="member/reset-password"
    password_reset_email_template="member/email-password-reset"
    }

    {if errors}
        <fieldset class="error">
            <legend>Errors</legend>
            {errors}
                <p>{error}</p>
            {/errors}
        </fieldset>
    {/if}
    <p>
        <label>Your Email Address</label><br />
        <input type="email" name="email" value="" maxlength="120" size="40" />
    </p>

    <p><input type="submit" name="submit" value="Submit" /></p>

    <p><a href="{path='member/login'}">Login</a> &nbsp; &nbsp; <a href="{path='member/registration'}">Register</a></p>
{/exp:member:forgot_password_form}