Skip to content

Instantly share code, notes, and snippets.

@bryceadams
Last active April 19, 2016 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bryceadams/368d3396d72ca8e4b1da to your computer and use it in GitHub Desktop.
Save bryceadams/368d3396d72ca8e4b1da to your computer and use it in GitHub Desktop.
// 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' => '',
);
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' => '',
);
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;
}
@umiya
Copy link

umiya commented Mar 28, 2015

hello sir,in this example if i want to add radio button then can i do this and is then what is the value for type field .i want to add radio button in resume page but i do not understand how.pls reply me

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