Last active
January 17, 2024 18:59
-
-
Save johnmccole/62423f68d14f45721c173f1d1ceb5216 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Populate Form Fields | |
// ID | |
add_filter( 'gform_field_value_ID', 'populate_ID' ); | |
function populate_ID( $value ) { | |
$id = get_the_ID(); | |
return $id; | |
} | |
// Job Title | |
add_filter( 'gform_field_value_jobTitle', 'populate_jobTitle' ); | |
function populate_jobTitle( $value ) { | |
$job_title = get_the_title(get_the_ID()); | |
return $job_title; | |
} | |
// Owner | |
add_filter( 'gform_field_value_owner', 'populate_owner' ); | |
function populate_owner( $value ) { | |
$owner = get_field('owner_email', get_the_ID()); | |
return $owner; | |
} | |
// City | |
add_filter( 'gform_field_value_jobCity', 'populate_city' ); | |
function populate_city( $value ) { | |
$city = get_field('job_city', get_the_ID()); | |
return $city; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment