Skip Navigation

[Resolved] Redirect after submit a forms

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

Last updated by charlesR-5 6 years, 8 months ago.

Assisted by: Shane.

Author
Posts
#550876

Hi,

In one of your topics, you give this code

 add_filter('cred_success_redirect_2', 'redirect_to_parent', 10, 3);
function redirect_to_parent($url, $post_id, $thisform) {
  $parent_id = get_post_meta( $post_id, '_wpcf_belongs_parent_id', true);
  return get_permalink( $parent_id );
}

I want to know if I can redirect multiple childs to one parent after submission. With that code, I can only redirect one child (cred_success_redirect_2).

Best regards,

Charles

#550993

Shane
Supporter

Languages: English (English )

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

Hi Charles,

Thank you for contacting our support forum.

Will the users be redirected to the same parent regardless of each child ?

Please let me know.

Thanks,
Shane

#551025

Yes!

#551028

Shane
Supporter

Languages: English (English )

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

Hi Charles,

Could you let me know what is the ID of this parent post so I can modify the code for you.

Thanks,
Shane

#551413

I found another solution! Thanks Shane

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