# How do I retrieve some data based on ID?

**URL:** <https://community.gravityforms.com/t/how-do-i-retrieve-some-data-based-on-id/3825>\
**Category:** Get Help\
**Tags:** gfapi, gform\_field\_value\
**Created:** [February 4, 2020, 8:24am UTC](https://community.gravityforms.com/t/how-do-i-retrieve-some-data-based-on-id/3825 "2020-02-04T08:24:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jfendy](https://avatars.discourse-cdn.com/v4/letter/j/7feea3/32.png) [@jfendy](https://community.gravityforms.com/u/jfendy)\
**Post date:** [February 4, 2020, 8:24am UTC](https://community.gravityforms.com/t/how-do-i-retrieve-some-data-based-on-id/3825/1 "2020-02-04T08:24:09Z")

</div>

how to retrieve data automatically in the form of gravity?

The work flow is as follows:  
First the user submits basic data such as name and email, then when the user wants to fill in the second form, some fields in the form are filled in automatically such as name and email based on the id chosen by the user.

Thank you

---

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [February 4, 2020, 3:41pm UTC](https://community.gravityforms.com/t/how-do-i-retrieve-some-data-based-on-id/3825/2 "2020-02-04T15:41:24Z")

</div>

You can do that with the gform\_field\_value filter:

> **[gform\_field\_value\_$parameter\_name - Gravity Forms Documentation](https://docs.gravityforms.com/gform_field_value_parameter_name/)**
>
> This filter is executed before displaying each field and can be used to dynamically populate fields with a default value.

To retrieve information from the database from your existing entries, you can use the Gravity Forms API functions:

> **[GFAPI Class - Gravity Forms Documentation](https://docs.gravityforms.com/api-functions/#get-entry)**
>
> The Gravity Forms API Functions provides developers with a future-proof way to access some of the common core functionality in Gravity Forms.

---

<div class="post-metadata">

**Author:** ![richardw8k](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/richardw8k/32/2354_2.png) [@richardw8k](https://community.gravityforms.com/u/richardw8k)\
**Post date:** [January 5, 2022, 8:53am UTC](https://community.gravityforms.com/t/how-do-i-retrieve-some-data-based-on-id/3825/3 "2022-01-05T08:53:51Z")

</div>


