Auto Populate from User Meta Feature

With the release of version 1.1.12 of WP Job Manager Field Editor, a new feature has been added which is called Auto Populate.  This will allow you to auto populate any of the currently editable fields with a value pulled from a user’s meta.

The auto populate feature now also supports saving to the users meta.  The screenshots below may not show it but there is now a checkbox below Auto Populate which you can select to enable saving the field to the user’s meta.  This will auto populate on the next listing the user submits as long as you have Auto Populate enabled.

As an example, WP Job Manager automatically saves a couple fields to a user’s meta whenever they create their first job, such as company_name.  When that same user goes to post a new job, the Company Name field is auto populated with the value that was saved to the user meta.  This new feature will allow you to auto populate any of the fields (including taxonomies) with items saved in a user’s meta.

A few things to point out:

  • This only works for pulling values from user meta
  • Users must already have an account
  • Version 1.7.6 or newer is required for WP Job Manager Resumes (workaround is available below)

 

WP Job Manager Field Editor Auto Populate

WP Job Manager Field Editor Auto Populate

Overview

To setup auto populate with an existing field (or a new one), you will need to go to the field configuration to make the change.  All auto populate configuration will be done through the modal under the Populate section/tab.

When you click on edit or create a new field when the modal pops up you will see a new tab on the left hand side that should look like the image on the right.

 

 

 

 

WP Job Manager Field Editor Auto Populate Example

WP Job Manager Field Editor Auto Populate Example

Configuration

Currently there are only two configuration settings, enable and meta key.  Enable must be checked in order for auto populate to function correctly.

Meta Key is going to be the field you need to make sure is correct.  This value is just like a meta key for fields (no spaces, etc).

As you can see in the image on the left the meta key entered was candidate_phone, if you look at the image below, you will see that is the value found in my User Meta Display plugin.

 

User Meta Display

User Meta Display

Jobify Theme Auto Populate Example

Jobify Theme Auto Populate Example

 

Determining User Meta Keys

You can inspect any users meta by using my free Open Source plugin called User Meta Display.  This will allow you to add, edit, and view any user’s meta (with a nice intuitive ajax interface).  I recommend using this plugin if you are unsure of what the meta key is for the user meta you want to use.  If the meta key is incorrect, or the meta does not exist for that user, nothing will be populated into the field.

Currently this feature ONLY populates fields from user meta, it does not save to user meta.

Old Versions of WP Job Manager Resumes ( < 1.7.6 )

You must be using WP Job Manager Resumes version 1.7.6 or newer for this feature to function correctly for Resumes.  If you do not have this version (currently not released yet as of 10/27/2014), it is fairly easy to add the functionality.  You will need to add a few lines of code to one of the WP Job Manager Resumes files as directed below.

This is the code we need to add:

Which will be replacing the  }  from right above the  get_job_manager_template( 'resume-submit.php', array(  line.

The file you need to edit is

You will need to look for the submit()  function which should be around line  584

This is the original function below:

This is how the function should look after being updated:

 

Total 2 Votes

Tell us how can we improve this post?

+ = Verify Human or Spambot ?