Skip Navigation

[Resolved] Can I redirect user after showing the form submission message?

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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 3 replies, has 2 voices.

Last updated by Shane 2 years ago.

Assisted by: Shane.

Author
Posts
#2339819

I want to show the confirmation message on the form submission and then after 2 seconds redirect the user to the edited post. Can this be done with Toolset?

#2339873

Shane
Supporter

Languages: English (English )

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

Hi Himanshu,

Thank you for getting in touch.

Unfortunately if you're using the display a message option then you won't be able to redirect after this.

The default redirection setting does display a short message "Please Wait, you are being redirected" after the form has been submitted so you can use this option.

I was also looking for a way to change this message but haven't found any.

Thanks,
Shane

#2339903

I was able to change the redirect message like this

<?php
/**
 * New custom code snippet (replace this with snippet description).
 */

toolset_snippet_security_check() or die( 'Direct access is not allowed' );

// Put the code of your snippet below this comment.
add_filter( 'gettext', 'custom_cred_redirection_msg_func', 20, 3 );
  
function custom_cred_redirection_msg_func( $translated_text, $text, $domain ) {
    if($text == 'Please Wait. You are being redirected...' && $domain = 'wp-cred'){
        $translated_text = "<strong style='font-size:20px;margin-right:5px;'>Processing...<br><img alt='' src='filename' width='140' height='16'/></strong>";
    }
    return $translated_text;
}
?>

Is there a way to look for the right form in the above code and then show a custom message per form?

#2339923

Shane
Supporter

Languages: English (English )

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

Hi Himanshu,

You may not be able to get the specific form ID however you can perform the trigger based on the Post/Page ID given that the message is still being displayed on the same page.

Thanks,
Shane

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.