Populating gravity forms dynamically
-
I am trying to use this code:
`add_filter(‘gform_field_value_first_name’, ‘my_custom_population_function’);
function my_custom_population_function($value){
global $current_user;
$current_user = wp_get_current_user(‘firstname’, $current_user->user_firstname);
return $first_name;`
}I am trying to populate a gravity form with it. I would like to grab the current users first name and last name and fill them in the form dynamically.
Honestly I don’t don’t know php but I am learning to understand it. I done as much online research as I can on my own and I appreciate you sharing your knowledge with me.Thank you in advance for your help.
My site is:http://elkspring.net/
The form is located here:http://elkspring.net/contact-form/
The topic ‘Populating gravity forms dynamically’ is closed to new replies.