Skip Navigation

[Resolved] Thank you page

This support ticket is created 2 years, 4 months ago. 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 7 replies, has 2 voices.

Last updated by Shane 2 years, 4 months ago.

Assisted by: Shane.

Author
Posts
#2420767

Pat

Hello,
I have created a User form and would like to redirect the form after completion to a specific Thanks you page.
In this page, I would like to display some of the Form info (firstname, lastname ...).
How can I get those info?
Regards
Pat

#2420833

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Pat,

Thank you for getting in touch.

Unfortunately this won't be possible to achieve given that the user data won't be available to a guest user.

In order for you to pull this data about the newly registered user they would need to be logged in.

Thanks,
Shane

#2420901

Pat

Hi Shane,

Sounds bad. I have seen this feature in some website and wonder how this is feasible?
On an other hand, I could use the message in the same page, but the issue there is that I have different messages on this page depending on the user is logged-in or if the user has a certain role. So, in this case, the user is not logged-in and so, the message for non logged-in user is displayed. Is there a way to manage between a non logegd-in user and a user that have filled the form?

Regards
Pat

#2421065

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Pat,

Sounds bad. I have seen this feature in some website and wonder how this is feasible?

Usually this is a case where it is a custom form and is designed to pass this kind of data to their thank you page.

Is there a way to manage between a non logged-in user and a user that have filled the form?

Are you referring to displaying a different message whether the form is filled out by a logged in user or not ?

In this case you can try using out conditional tag to check if the user is logged in.

[wpv-conditional if="([wpv-current-user info='logged_in']) eq '1' "]User is Logged in [/wpv-conditional]

Please let me know if this helps.
Thanks,
Shane

#2421443

Pat

Hi Shane,

Understood. I will change to add the non logged text inside the form. Doing this, I will be able to display a message after the form fill.
Now, what do I need to display the form fields inside this message. Can I use them using the standard Views fields (or do I need to use %%USER_FIRSTNAME%% for example)?
Regards
Pat

#2421683

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Pat,

Are you referring to if a user who is logged in fills out the form ?

If such is the case it won't display what the user filled out in the form, it will display the information of the current user.

However if you setup the notifications for your form then you will be able to send the data that was entered onto the form into this.

Also I thought of a way that you can have your thank you page with the form data. Using the redirect hook below we can pass the information from the form in the URL and then retrieve it on the thank you page.

add_filter('cred_success_redirect', 'custom_redirect',10,3);
function custom_redirect($url, $post_id, $form_data)
{
    if ($form_data['id']==12){
        $first =  $_POST['first_name'];
        return '<em><u>hidden link</u></em>'.$first.'';

}
   
    return $url;
}
 

As you can see im getting the first_name from the form and appending it to the redirect URL of my form. Now to retrieve the first name on the thank you page, you will need to add the following shortcode to the page that you're redirecting to.

[wpv-search-term param='name']

This will pull the value from the URL parameter called name.

Please let me know if this helps.
Thanks,
Shane

#2421697

Pat

Hi Shane,

No, I'm just speaking of the success message that is displayed after the form has been filled. We have the ability with Form to define what to do after the submission (another page, cart, message ...). I just want to display the success message with some of the Form field inside.
For info, the Form creates new user, so the user is not logged when he is submitting the form (in fact, I have a conditional output that change the content of this page depending of the user logged-in or not. If not logged, then, we display the Form and when the form is submitted, I want to display the success message using some fields of the form (firstname, lastname).
Regards
Pat

#2421703

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Pat,

I just want to display the success message with some of the Form field inside.

In that case then no this won't be possible to do, you won't be able to display data from the form in the success message that is being displayed after you submit the form.

Thanks,
Shane