Application form based on job category
You are probably wondering if it is possible to show different application form, based on the job category? By default, no, but using a “wpjb_form_scheme” filter you can do that.
If you do not know how to add snippets properly, take a look at our documentation file, where we explained how you can do this.
add_filter( "wpjb_form_scheme", "wpjb_form_scheme", 10, 3 ); function wpjb_form_scheme( $param, $context, $job_id ) { // We made this only for apply forms if( $context != "apply") { return $param; } // We get category slug and search for form with code equal to category slug $job = new Wpjb_Model_Job( $job_id ); $slug = $job->getTag()->category[0]->slug; $param['custom'] = rtrim( "wpjb_form_apply_" . $slug, "_" ); return $param; }
Now if you have a job with the category set to “IT” (with slug “it”) then when a user will view the job details page after clicking on the “Apply Online” button he will see application form with a name “it”.