1

I've created a password reset template from here https://craftcms.com/knowledge-base/front-end-user-accounts#reset-password-forms. After submitting this form it redirects to the homepage. Is it possible, to set here own redirect? In base case, to the same page, where would be written something like "Check your email for instructions".

1 Answer 1

2

To tell Craft where to redirect the user after successfully submitting the form, you can add a hidden input named redirect.

The best way to do this is by using the redirectInput() Twig function, i.e.

<form method="post" accept-charset="UTF-8">

  {{ csrfInput() }}
  {{ actionInput('users/send-password-reset-email') }}

  {# After submitting the form, redirect to https://example.com/go/here #}
  {{ redirectInput('go/here') }}

  ...

</form>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.