Title: Populating gravity forms dynamically
Last modified: August 21, 2016

---

# Populating gravity forms dynamically

 *  Resolved [rmarcuse](https://wordpress.org/support/users/rmarcuse/)
 * (@rmarcuse)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/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/](http://elkspring.net/)
   The form is located here:[http://elkspring.net/contact-form/](http://elkspring.net/contact-form/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [rmarcuse](https://wordpress.org/support/users/rmarcuse/)
 * (@rmarcuse)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/populating-gravity-forms-dynamically/#post-4259172)
 * I figured it out

Viewing 1 replies (of 1 total)

The topic ‘Populating gravity forms dynamically’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [rmarcuse](https://wordpress.org/support/users/rmarcuse/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/populating-gravity-forms-dynamically/#post-4259172)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
