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
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>