Home › Toolset Professional Support › [Resolved] Toolset Forms: change text of "you are being redirected 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 |
---|---|---|---|---|---|---|
- | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | - |
- | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | - |
Supporter timezone: Europe/London (GMT+00:00)
Tagged: Content-submission forms, Toolset Forms
Related documentation:
This topic contains 5 replies, has 2 voices.
Last updated by David 4 years, 8 months ago.
Assisted by: Nigel.
Hi there,
I wonder if it is possible now to change the text of the notice that is displayed when a form is submitted. Currently is says "Please wait. You are being redirected".
I see from a previous post that there might be a filter for this available at some point:
https://toolset.com/forums/topic/translate-message-please-wait-you-are-being-redirected/
Is this something we can now change?
Thanks.
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Within the Toolset Forms code the string is added as a translatable string in a gettext call, e.g.
__( 'Please Wait. You are being redirected...', 'wp-cred' )
What that means is that you can use the gettext filter to replace the text with some other string of your choice (as if you were translating it), for example:
add_filter( 'gettext', 'ts_replace_string', 10, 3 ); function ts_replace_string( $translation, $text, $domain ){ if ( $domain == 'wp-cred' && $text == 'Please Wait. You are being redirected...' ){ $translation = 'My custom string'; } }
You can add that as a code snippet at Toolset > Settings > Custom Code.
My issue is resolved now. Thank you!
Hi,
I just realised that this code snippet messes up my Dashboard.
With it running, a lot of text in my Dashboard is not visible - it makes it impossible to perform most Dashboard tasks.
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Sorry, the code is missing a return statement.
Try
add_filter( 'gettext', 'ts_replace_string', 10, 3 ); function ts_replace_string( $translation, $text, $domain ){ if ( $domain == 'wp-cred' && $text == 'Please Wait. You are being redirected...' ){ $translation = 'My custom string'; } return $translation; }
Thank you!