Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add a field to resume submission form in WPJM Resume Manager
// Add field to admin
add_filter( 'resume_manager_resume_fields', 'wpjms_admin_resume_form_fields' );
function wpjms_admin_resume_form_fields( $fields ) {
$fields['_candidate_color'] = array(
'label' => __( 'Favourite Color', 'job_manager' ),
'type' => 'text',
'placeholder' => __( 'Blue', 'job_manager' ),
'description' => '',
'priority' => 1
);
return $fields;
}
// 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_color'] = array(
'label' => __( 'Favourite Color', 'job_manager' ),
'type' => 'text',
'required' => true,
'placeholder' => '',
'priority' => 1
);
return $fields;
}
// Add a line to the notifcation email with custom field
add_filter( 'apply_with_resume_email_message', 'wpjms_color_field_email_message', 10, 2 );
function wpjms_color_field_email_message( $message, $resume_id ) {
$message[] = "\n" . "Favourite Color: " . get_post_meta( $resume_id, '_candidate_color', true );
return $message;
}
@yumnihon

This comment has been minimized.

Copy link

@yumnihon yumnihon commented Sep 20, 2017

Hello danjjohnson,

How to format:
'type' => 'date',
Date is datepick of birthday show month and year dropdowns header

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment