Skip Navigation

[Résolu] How to redirect from a CRED (new)USER form to the appropriate Cred POST form

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:
How to set referrer using CRED forms.

Solution:
To set referrer using CRED form it will require custom programming.

You can find proposed solution with the following reply:
https://toolset.com/forums/topic/how-to-redirect-from-a-cred-newuser-form-to-the-appropriate-cred-post-form/#post-411402

Relevant Documentation:
More info:
=> https://codex.wordpress.org/Function_Reference/wp_get_referer
=> https://codex.wordpress.org/Function_Reference/wp_get_original_referer

This support ticket is created Il y a 6 années et 5 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 4 réponses, has 2 voix.

Last updated by Alan Il y a 6 années et 5 mois.

Assigned support staff: Minesh.

Auteur
Publications
#411042

Hello,

I can follow the basic tutorials for creating functional Cred USER forms, and Cred POST forms, and my question concerns how to link the two, to make the "flow" more logical for users.

Here's the scenario - a user can submit various types of content, and there are separate Cred POST forms to create these new custom posts.
But, Access to those forms is restricted to logged in users only, and people who are not signed are redirected to the registration/Login page.

My query is - once people have signed in, or created their account via the Cred USER form, how can I redirect people back to the appropriate Cred POST form that they originally clicked on?
I want to maintain the "flow" of what they were trying to do, rather than just sending everybody back to the same "thanks" page, and then hoping that they find their way back to the action they wanted to take.

thanks,
Alan

#411301

Minesh
Supporter

Languages: Anglais (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Yes - it's possible but you need to write some custom code.

With WordPress you get get referer URL using function: wp_get_referer()

=> Store the original referer to session
=> use referer stored in session to redirect user when he login/register

More info:
=> https://codex.wordpress.org/Function_Reference/wp_get_referer
=> https://codex.wordpress.org/Function_Reference/wp_get_original_referer

However, this will need custom programming and for your custom programming need, please feel free to contact our certified partners.
=> https://toolset.com/consultant/

#411402

Hi Minesh

Thanks for your advice.

I was searching through the forum and even though it's really hard to find relevant past threads, I stumbled across this thread - would you agree that it's a good solution to this issue?
(I've not tried it yet)

https://toolset.com/forums/topic/cred-user-forms-redirect-to-previous-post/#post-320985

thanks for your help 🙂
Alan

#411692

Minesh
Supporter

Languages: Anglais (English )

Timezone: Asia/Kolkata (GMT+05:30)

Yes - I think you may try that as well.

It should work as shown in the post you shared with me.

#411714

Thanks Minesh. Might as well close this one.