I am trying to use the forgot password and reset password shortcodes but there is something off with the setup that makes it difficult to use the forms.
I am using the forgot password form like this on a "forgot-password page"
[wpv-forgot-password-form redirect_url='<em><u>hidden link</u></em>' redirect_url_fail='<em><u>hidden link</u></em>;
This was the user is redirected to a page where they are prompted to check their email on success. Users also receive an error message on the same page when the validation fails.
I have another page called "reset-password" and there I am using this:
[wpv-reset-password-form redirect_url='<em><u>hidden link</u></em>;
Once the user adds the new password they are redirected to a confirmation page that says password reset and asks the user to login.
What is the problem?
The forgot password page redirects the user to the right confirmation page but the email received is a generic email from WordPress.
Link: hidden link
When I click on the link it takes me to WordPress password reset instead of my own reset password page.
What am I missing here and does the user even receive an email to reset the password with toolset forgot password shortcode? How does this shortcode match with reset-password shortcode i.e. how does the reset password shortcode know which user's details have to be changed?
Hi,
Thank you for contacting us and I'd be happy to assist.
The password reset email link, in this case, is using the WordPress' default reset password link, because, in your "wpv-forgot-password-form" shortcode, a link for the custom reset password page is not provided through the "reset_password_url" attribute:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-forgot-password-form
Assuming that your custom reset password page is at /reset-password/, it will look like this:
[wpv-forgot-password-form redirect_url='<em><u>hidden link</u></em>' redirect_url_fail='<em><u>hidden link</u></em>' reset_password_url="<em><u>hidden link</u></em>"]
As a result, the forgot password reset email that the user will receive, will have a link to the custom reset password page and not WordPress's default one.
And just as the default password reset link, a special URL parameter "key" attribute will be added in the link, which will help in identifying which user's password needs to be reset.
regards,
Waqar
It worked like a charm. Thanks, Waqar!
My issue is resolved now. Thank you!