Skip Navigation

[Resolved] After CRED submit redirect to a custom url with target blank

This support ticket is created 3 years, 11 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
- 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 2 replies, has 2 voices.

Last updated by Lara 3 years, 11 months ago.

Assisted by: Minesh.

Author
Posts
#1601743

Tell us what you are trying to do?

After I submit the CRED form, the customer should be redirected to a custom url with traget='_blank'

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

   
    return $url;
}

The code works fine. After the CRED form is submitted, the user will be redirected to hidden link
My question: Is there a way to open hidden link in a new window with traget='_blank' ?

Is there any documentation that you are following?
https://toolset.com/forums/topic/allow-redirect-to-specific-link-or-custom-post-type/

Is there a similar example that we can see?
See documentation

What is the link to your site?
hidden link

#1602321

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

No, there is no such feature available to redirect the page on the new window or tab as redirection is supposed to happen on the same window.

You may try to use the window.open() on your own if that help you to resolve your issue.
=> https://stackoverflow.com/questions/19851782/how-to-open-a-url-in-a-new-tab-using-javascript-or-jquery

#1602769

Many thanks Minesh.

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