Problem:
The issue here is that the user wanted to redirect to a page after the form is submitted.
Solution:
The correct code example to do this can be seen below.
add_filter('cred_success_redirect', 'custom_room_edit_redirect',10,3); function custom_room_edit_redirect($url, $post_id, $form_data) { if ($form_data['id']==207199){ $url = toolset_get_related_post($post_id, array( 'bb', 'add-room-field' )); $url = get_permalink($bb_post); } return $url ; }
For more information on this hook take a look at our document here.
https://toolset.com/documentation/programmer-reference/cred-api/#cred_success_redirect
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 2 replies, has 2 voices.
Last updated by 6 years, 1 month ago.
Assisted by: Shane.