Problem: I would like to create a multi-step Form.
Solution: Create multiple Forms as described in the post: https://toolset.com/forums/topic/multi-page-cred-form-or-save-button-for-long-form
Update the custom code to work with the latest software versions:
add_filter('cred_success_redirect', 'stegvis_skjema_el_test',10,3); function stegvis_skjema_el_test($url, $post_id, $form_data) { if ($form_data['id']==874) { $arr = array('content-template-id'=>925); //the step 2 CRED form template ID $url = add_query_arg($arr, $url); } return $url; }
If your site uses Layouts, you should create an unassigned Template Layout instead of an unassigned Content Template. Then the code should include the layout ID, not the content template ID, and the proper URL parameter.
add_filter('cred_success_redirect', 'stegvis_skjema_el_test',10,3); function stegvis_skjema_el_test($url, $post_id, $form_data) { if ($form_data['id']==874) { $arr = array('layout_id'=>12345); //the step 2 CRED form template ID $url = add_query_arg($arr, $url); } return $url; }
Relevant Documentation: https://toolset.com/documentation/programmer-reference/cred-api/#cred_success_redirect
https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/forms-for-editing/
https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/building-forms-for-editing-when-using-layouts/
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 |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 16 replies, has 3 voices.
Last updated by 5 years, 6 months ago.
Assisted by: Christian Cox.