Created
February 28, 2014 03:27
-
-
Save mikeselander/9264627 to your computer and use it in GitHub Desktop.
This is an example of the gform_field_value function
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
/** | |
* Pre-populates a company ID into a Gravity Forms field from a GET variable | |
* | |
* @since 0.1.0 | |
* | |
*/ | |
add_filter('gform_field_value_company_id', 'company_id_population'); | |
function company_id_population(){ | |
// if we have the proper company GET variable - set the return variable | |
if ( $_GET['company_id'] ){ | |
return $_GET['company_id']; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You have to call a predefined "populate_XXX" function and not use another naming.