Problem: I have a Form that creates Job posts. That form is set to redirect to another page that contains another Form that creates RFGs for that Job post. I would like to make sure these RFGs are automatically associated with the correct Job post.
Solution: You'll have to use a bit of custom code to add a URL parameter to the first Form's redirect.
add_filter('cred_success_redirect', 'custom_redirect_job_rfg',10,3); function custom_redirect_job_rfg($url, $post_id, $form_data) { $forms = array( 94 ); if ( in_array( $form_data['id'], $forms ) ) { return $url . '?jobid=' . $post_id; } return $url; }
Then in the Form that creates RFGs, set the Job field default value using the 'jobid' URL parameter. Use CSS to hide this field if necessary.
The new RFG Form must not use AJAX if you want to continue to display the Form after submission and keep the Job selected.
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 19 replies, has 2 voices.
Last updated by 5 years, 6 months ago.
Assisted by: Christian Cox.