Using Custom Fields
‘Custom Fields’ will allow user to add manual fields while adding or editing ‘Job Board Forms’ and ‘Resumes Forms’.
‘Job Board Forms’ contains ‘Add/Edit Job Form’, ‘Apply Online Form’ and ‘Advanced Search Form’.
‘Resumes Forms’ contains ‘My Resume Form’ and ‘Advanced Search Form’.
Add/Edit/Delete Custom Fields:
To add custom field user has to edit the forms in which user wants to add/edit new fields.
To access the ‘Custom Fields’ page follow the below mentioned sequence.
- Login to wp-admin/Settings(WPJB)/Custom Fields
Custom fields contain ‘Group Box’, ‘Text Box’, ‘Check Box’, ‘Radio Button’, ‘Drop Down’, ‘Text Area and ‘File Upload’.
User will be able to place the custom fields by drag and drop them from ‘Basic Fields’ to the respective forms.
After placing the field through setting box user can change the properties. User can also delete the added fields by clicking on delete icon, which appears by hovering the mouse on the added fields.
Hi,
It seems when I add custom fields I cannot control the order. I tried dragging them, then recreating them but they always appear in a different order on the front-end then what I intended.
Thanks
Hi,
custom fields order affects forms only, if you would like to change items order in the frontend you would need to directly in WPJB template files.
If I use add a field to Add/Edit Job Form, for example “brief_description” how can use php to get this to be displayed on my index page under each job posting? Thanks
@James how to display newly created Custom Field on jobs list is described here https://wpjobboard.net/kb/modifying-jobs-list-table-columns/
it would be nice if we can export the forms we have created in custom fields. is that possible? on a code/ db level?
Is there a way to make the contents of a custom field searchable?
@Gary if you would like to make a custom field searchable from Keyword field it is possible using wpjb_customize_job_search filter
add_action("wpjb_customize_job_search", "my_customize_job_search");
function my_customize_job_search($object) {
$job = new Wpjb_Model_Job($object->job_id);
$object->job_description = $object->job_description."\r\n".$job->meta->CUSTOM_FIELD->value();
$object->save();
}
Few notes:
1. the code should go to your theme functions.php file or even better into new plugin
2. replace CUSTOM_FIELD with actual custom field name
3. the code will work only for jobs that are saved after you add this code, in other words once you will have this code added you will need click Update in job edition panel for each active job.
Hi,
that was excactly what I was looking for. But there is one typo.
It has to be:
add_action("wpjb_customize_job_search", "my_customize_job_search");
function my_customize_job_search($object) {
$job = new Wpjb_Model_Job($object->job_id);
$object->description = $object->description."\r\n".$job->meta->CUSTOM_FIELD->value();
$object->save();
}
as defined in JobSearch.php
Best
Hello there.
How to use any CF in the job.php file in order to add a meta itemprop information? Thanks 😉
Hi, please see https://wpjobboard.net/kb/modifying-jobs-list-table-columns/ (it’s for index-item.php but will work the same for job.php file), you can display any custom field value using following code
meta->MY_META_NAME->value() ?>
of course replace MY_META_NAME with your actual meta field name.
hello
i m trying to set default value on new custom field elements but the field is locked i can t touch it..
Also i would like to change the category field to be a checkbox but i didn t find a way to do it
Hi Greg,
I’m trying to find a Way to display all values (not the values linked to a job) from a custom field I’ve added to the job form. This field is a select input with multiple values.
How can I list these choices on the front-end?
Regards!
@Julien you can use following SQL query in order to get all unique values for selected custom field
SELECT DISTINCT value FROM `wp_wpjb_meta_value` WHERE meta_id=7
of course you need to replace 7 with actual custom field id (you will find them in wp_wpjb_meta table).
Is there a way to add a custom field of type: date? Have an date field that is different than the publish date as part of the job description.
@Brandon, in latest version if you add a Text field, and in field properties set it to be validated as date, then datepicker will be automatically activated for this field.
@Greg, Thanks! that’s exactly what I was looking for. In order to format the date differently, do I need to edit that in your plugin code?
Also was curious about the location picker. Is there any way thats built in to do radius type searches? If someone puts in a zip code as their “where” search token then whats the algorithm for finding the jobs near them?
I’m not having success with this method. Any suggestions? Thank you.
Please make sure, you are using WPJB version 4.1.4 or newer, this feature was introduced recently.
Is there a functionality that will crop candidate image during file upload?
Currently WPJB does not have such feature i am afraid.
How can I display or echo current logged in user’s resume meta/custom field value.
@Rahul you can do this using following code
$resume = Wpjb_Model_Resume::current();
if($resume && isset($resume->meta->CUSTOM_FIELD) {
Wpjb_Model_Resume::current()->meta->CUSTOM_FIELD->value();
}
the “if” statement checks if user is loggedin as candidate and if the CUSTOM_FIELD exists and is set, of course replace CUSTOM_FIELD with your actual custom field name.
HI it worked when I used like
$resume = Wpjb_Model_Resume::current();
{
Wpjb_Model_Resume::current()->meta->CUSTOM_FIELD->value();
}
How can I input its value in template short code replacing “xyz” in bellow statement
echo apply_filters(‘the_content’,’[wpjb_jobs_list meta__field_2=”XYZ”]‘);
Hi its giving me blank page i replaced it as field_2 which is custom field and inserted in page.php.
Kindly suggest.
Or this would solve my issue
I have grabbed custom field value using sql query in template file only need to insert it in place of “XYZ”
echo apply_filters(‘the_content’,'[wpjb_jobs_list meta__field_2=”XYZ”]’);
I’m trying to get a custom radio section working. As it stands it will display correct, but when I attempt to preview the job with one of these options selected I get a 404 error. The form works fine otherwise, including use of other custom fields. Any thoughts on what could cause this sort of behavior?
Usually this happens because of mod_security installed on server, please try creating a new custom field and give it a name that would not cause a conflict the easiest way to do this is to prefix field name with “my_”.
I m trying to dependent select box State and City but not working.
Hi, i am afraid that right now the custom fields editor does not allow to have conditional fields.
Ok