Hi,
I need to put together some docs for this, but the main types are:
- File
- Text
- Select
- checkbox
- password
- multiselect
- textarea
- wp-editor
For a range, you probably want to use select, and pass in an array of ‘options’
Hey Mike,
Thanks for your help. 🙂
I’m not sure how do I enter the code in for Array. Can you help me with it please?
Here’s the code to adding the field in :
function frontend_add_salary_field( $fields ) {
$fields[‘resume_fields’][‘job_salary’] = array(
‘label’ => __( ‘Salary’, ‘job_manager’ ),
‘type’ => ‘select’,
‘required’ => true,
‘placeholder’ => ”,
‘priority’ => 4
);
return $fields;
}
Thanks in advance!
Not sure if I’m allowed to help here or not, but instead of the ‘placeholder’ line try something like this:
'options' => array ('$10k to $20k'=>"$10,000 to $20,000", '$20k to $30k'=>"$20,000 to $30,000" ),
You can add more key and value pairs as you would like to cover the appropriate ranges you are looking for. Those are just examples, but they should work if everything else in your code is working.
I hope that helps!
^ that code is fine. Thanks Adam.
Hey Adam,
Thank you so much. It’s working now. 🙂
Hey guys,
Just to check, how about “Checkbox”? What’s the code for creating the checkbox options?
Thanks in advance!
There is a checkbox field type, but its a single checkbox, not for multiple values.
Hi Mike,
Thanks again for your help.
I’m trying to achieve this:
Question: When are you available?
Option A : 1st January
Option B : 2nd January
Option C : 3rd January
User can have the option to select one or more options like checkbox. What’s the best way to achieve it if there isn’t multi checkbox function.
Thanks in advance!
Hi Mike,
I have changed the type to “multiselect”. The following is the code:
add_filter( ‘submit_resume_form_fields’, ‘frontend_add_style_field’ );
function frontend_add_style_field( $fields ) {
$fields[‘resume_fields’][‘job_style’] = array(
‘label’ => __( ‘Teaching Style’, ‘job_manager’ ),
‘type’ => ‘multiselect’,
‘required’ => false,
‘options’ => array (‘Group’=>”Group”, ‘1 to 1’=>”1 to 1″ ),
‘priority’ => 5
);
return $fields;
}
The form seems to be displaying fine but it doesn’t capture the user’s input after completing and saving the form.
URL : http://tutors.com.sg/submit-your-resume/
I’m not sure how to resolve this. Please help.
If you add it to admin like this:
// Add your own function to filter the fields
add_filter( 'resume_manager_resume_fields', 'custom_resume_manager_resume_fields' );
// This is your function which takes the fields, modifies them, and returns them
function custom_resume_manager_resume_fields( $fields ) {
$fields['_job_style'] = array(
'label' => __( 'Teaching Style', 'job_manager' ),
'type' => 'multiselect',
'options' => array(
'Group' =>"Group",
'1 to 1' => "1 to 1"
)
);
return $fields;
}
The posted value will be shown: https://dl.dropboxusercontent.com/s/gtgt2nw1rq8f1ud/2015-01-24%20at%2022.53%202x.png?dl=0
I’m sorry Mike, I’m really stupid. Still doesn’t work.
http://awesomescreenshot.com/03749mrnd8
I have added your code into my Editor.
I’m getting this prompt as if the system doesn’t registers the user’s input via the form.
http://awesomescreenshot.com/06c49mt685
Please advice.
Use wpjobmanager.com/support/ so I can get access. Cannot do that here.