Resume Manager: Editing submission fields

Please note that all code examples on this site are provided for reference/guidance only and we cannot guarantee that they will always work as expected. Our support policy does not include assistance with modifying or debugging code from any code examples, and they may be changed or removed if we find they no longer work due to changes in our plugins.

 

Editing resume fields works in a similar manner to editing job submission fields – you can use filters and custom functions. Any custom code should be added as a snippet to a plugin like Code Snippets, which will help ensure your site doesn’t crash due to buggy code, or be overwritten during updates.

↑ Back to Top Editing fields on the frontend

Editing resume submission fields is possible via the submit_resume_form_fields filter. Adding some code will allow you to edit various fields, or add new ones.

See the below example which demonstrates how to change a field’s label:

Removing a field

If you’d like to remove a field from the form, you’d simply unset it using the same filter.

See the below example where the Candidate Title is being removed:

View the plugin’s source code for a full list of fields and values.

Adding a field

Similarly, you can add a field just as easily. Here’s an example showing how to add a new text input to the form:

Note: You can change the ‘priority’ of the field to position it where you want it. The higher the number, the lower down the form it will appear.

You could use a different field type like select or checkbox, just make sure to follow the same method to add those field types that WP Job Manager uses.

Note: To add it to the preview field you’d want to look at adding it to the template files, like content-single-resume.php, with some code like:

Please make sure to override core template files like the above.  Do not edit the core file directly.

 

↑ Back to Top Editing fields in admin

Fields in admin are of similar structure and can be edited using the ‘resume_manager_resume_fields’ filter. Each field takes a label, placeholder, type and description arguments.

See the below example which demonstrates how to change a field’s placeholder:

↑ Back to Top Making the 'Resume File' field required

A common request is to require a resume file to be added. Simply use the following code to make it so:

↑ Back to Top Adding a field to a repeated section

To add a field to one of the resume’s repeated sections (Education, Experience), the process is almost the same as adding a single field. Here’s an example of adding a “Favorite Teacher” field to each Education section.

Adding the field to admin

Note that we use the 'resume_manager_resume_education_fields' filter instead of 'resume_manager_resume_fields'.

It’s also important to include a 'name' entry as shown:

// Add field to admin
add_filter( 'resume_manager_resume_education_fields', 'wpjms_admin_resume_form_fields' );
function wpjms_admin_resume_form_fields( $fields ) {
	
	$fields['favorite_teacher'] = array(
	    'label' 		=> __( 'Favourite Teacher', 'job_manager' ),
	    'name'        => 'resume_education_teacher[]',
	    'type' 			=> 'text',
	    'placeholder' 	=> '',
	    'description'	=> '',
	    'priority' => 1
	);

	return $fields;
	
}

Adding the field to the frontend form

This code is almost the same as adding a single field to the form, you just need to include ['candidate_education']['fields'] to specify where this field should go.

// Add field to frontend
add_filter( 'submit_resume_form_fields', 'wpjms_frontend_resume_form_fields' );
function wpjms_frontend_resume_form_fields( $fields ) {
	
	$fields['resume_fields']['candidate_education']['fields']['favorite_teacher'] = array(
	    'label' => __( 'Favourite Teacher', 'job_manager' ),
	    'type' => 'text',
	    'required' => true,
	    'placeholder' => '',
	    'priority' => 1
	);

	return $fields;
	
}