Last active
April 19, 2016 14:14
-
-
Save bryceadams/368d3396d72ca8e4b1da to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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