How can I implement the redirect to a custom success page after registration form is submitted by a user?
I’m a complete noob at coding, but I’ve implemented several other features from this community and Git - and they are working. Thank you for this resource!
For my current request I’ve found the following:
1. Git - I unerstand that it’s a bit different from my needs, but I implemented this just t check if it works in general, to understand the logic - but nothing happens.
I’ve tried this in native Hive’s pop-up registration form and in seperate registration form with native hivepress_user_register_form short code. Again nothing happens.
2. This community relate topic -doesn’t works at all for me. Nothing happens.
About the first method, maybe I should change this function to something else?
or maybe I need somehow to link this code with this event? hp-form__messages hp-form__messages–success
This is vital for me because It’s a way for me to measure conversion rate.
The same question is for the e-mail verification link. The standard thing is that when user follows a confirmation link he/she is falling to his/her account settings being already signed in. Is there a way to change the destination but keep the auto-login feature at the same time?
Thank you in advance!
Please make sure that you added this code snippet with the Code Snippets plugin, you can check this tutorial - How to add custom code snippets - HivePress Help Center
Also, please note that this snippet will break some user flows.
For example, by default after registration, you will be redirected to the form to fill in the profile, if you add a custom redirect, then you will need to return to this form again to fill in the data.
Hi @andrii !
Thank you for you response.
I’ve added and activated the snippet through the Code Snippets plugin, but the signup form still doesn’t redirects. I don’t know what is the problem.
Could you please check what I’m doing wrong?
Please try this PHP snippet (note that this breaks some user flows):
$form['redirect'] = 'custom url here';
Oh my goodness! It works! Thank you once again. Perfect!
Can you please tell me how should i tweak this code if I want the redirect after clicking the “save changes” button in dashboard account settings (the form)?
Currently i have added this php code but it isnt working, let me know how i can tweak it
$form['redirect'] = 'https://wqtmasjid.com/choose-option';
Please try the “user_update” form instead of “user_delete”, but this may also affect the vendor registration form if you enabled direct registration.
No i dont want it to effect the vendor reg form. Just the profile settings. can you tell me how to tweak it for that purpose only? or someother php which only adds redirect to profile settings save changes button?
Please try this PHP snippet but please note that it can require further customization and testing. If you are not familiar with the code customization then please consider hiring someone for custom work https://fvrr.co/32e7LvY
$form['redirect'] = 'your custom link';
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.