Cms: {{ if email_sent }} var not working on forgot password form.

Created on 15 Jul 2020  路  7Comments  路  Source: statamic/cms

The {{if email_sent}} var is not working on the forgot password form. The email gets sent, that "success" message just never shows.

How to Reproduce

Make sure it's on forgot password form and enter your user email and send. Using this format from docs:

    {{ if email_sent }}
        <p>Email sent!</p>
    {{ else }}

        {{ if errors }}
            <div class="alert alert-danger">
                {{ errors }}
                    {{ value }}<br>
                {{ /errors }}
            </div>
        {{ /if }}

        <label>Email Address</label>
        <input type="text" name="email" />
        <button>Send Reset Email</button>
    {{ /if }}

Environment

Statamic version: 3.0.0.-beta-37

PHP version: 7.3

Install method:

  • Fresh install from statamic/statamic
bug ux

Most helpful comment

@jasonvarga @vitor-ao @twd3

I was able to do this using the session:status var:

  {{ if {session:status} }}
    {{ session }}
      {{ partial:auth/success :success_message="status" }}
    {{ /session }}
  {{ /if }}

All 7 comments

Shoot, not sure if this closed issue fixed this issue I'm having: https://github.com/statamic/cms/issues/2078

Don't think so. Looks separate.

I thought maybe I was logged in when I was testing this forgot password flow so I added that hop tip from the docs that says wrap this form in {{ if logged_out }} and I tested again and still does not show email_sent...

It's not hooked up. You've given enough info 馃憤

@jasonvarga @vitor-ao @twd3

I was able to do this using the session:status var:

  {{ if {session:status} }}
    {{ session }}
      {{ partial:auth/success :success_message="status" }}
    {{ /session }}
  {{ /if }}

Duplicate of #1777

Was this page helpful?
0 / 5 - 0 ratings