You probably want to use the gform_field_value_$parameter_name filter to call that Affiliates_Service::get_referrer_id() function from your affiliate plugin
http://www.gravityhelp.com/documentation/page/Gform_field_value_$parameter_name
If you have a hidden field in your form which is set to be populated dynamically (check that box on the advanced tab for your hidden field), and that field has a parameter name of "referrer_id" you will call the filter like this:
Then, you will write a function called populate_referrer_id which will call the Affiliates_Service::get_referrer_id(), maybe like this:
Here is a more verbose example. You are using the same procedure, but your function value comes from the affiliate plugin's function, not built in WordPress functions.
http://www.gravityhelp.com/documentation/page/Dynamically_Populating_the_Post_Author
Let us know if that works out for you.
Posted 12 years ago on Friday August 24, 2012 |
Permalink