Problem:
The issue here is that the user wanted to create his child post immediately after creating the parent and also having that child post automatically assigned to the created parent.
Solution:
You can achieve the redirect and the automatic parent assignment by using the hook below.
https://toolset.com/documentation/programmer-reference/cred-api/#cred_success_redirect
Using this format
add_filter('cred_success_redirect', 'custom_redirect',10,3); function custom_redirect($url, $post_id, $form_data) { if ($form_data['id']==12) return 'urltochildform?parent_{CPTSLUG}_id='.$post_id; return $url; }
You will need to add the child form to a different page and using the redirect hook above to redirect to that page.
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)
Ce sujet contient 4 réponses, a 2 voix.
Dernière mise à jour par Il y a 6 années et 9 mois.
Assisté par: Shane.