ExpressionEngine Docs

Forgot Username Form Tag

Overview

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

{{exp:member:forgot_username_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_username_form}

Parameters

email_subject=

email_subject="Your Username"

email_template=

email_template="member/email-forgot-username"

error_handling=

error_handling="inline"

Choose to display error messages inline (see Error Messages). By default, errors are displayed with the user message template.

return=

return="member/login/forgot-username"

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_username_form
    return="member/login/forgot-username"
    error_handling="inline"
    email_subject="Your Username"
    email_template="member/email-forgot-username"
    }

    {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_username_form}