# Populating fields from a database

**URL:** <https://community.gravityforms.com/t/populating-fields-from-a-database/1885>\
**Category:** Get Help\
**Tags:** dynamic-population, custom, populate-anything\
**Created:** [May 20, 2019, 11:31am UTC](https://community.gravityforms.com/t/populating-fields-from-a-database/1885 "2019-05-20T11:31:03Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![user5a7835188bee93.7](https://avatars.discourse-cdn.com/v4/letter/u/46a35a/32.png) [@user5a7835188bee93.7](https://community.gravityforms.com/u/user5a7835188bee93.7)\
**Post date:** [May 20, 2019, 11:31am UTC](https://community.gravityforms.com/t/populating-fields-from-a-database/1885/1 "2019-05-20T11:31:03Z")

</div>

Hi Guys

I need a little advice please.

We capture a lot of information from our clients on our contact form to allow us to quote for a catering event that the client is holding.

When they ask to book we then send them to a booking form that asks for: the same information (i.e client name and email, phone ect.); Some information that may have changed (menu, style of service); then extra information (i.e venue address, timings ect)  
Is there a way to collect the data submitted in in some sore od database?  
So the data collected in the 1st form, will then pre-populate the 2nd form (keeping in mind that the second form may not be filled until a few weeks have passed)

I’d be grateful for any advice!

Thanks  
Ben

---

<div class="post-metadata">

**Author:** ![JASCoder](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/jascoder/32/1147_2.png) [@JASCoder](https://community.gravityforms.com/u/JASCoder)\
**Post date:** [May 20, 2019, 5:19pm UTC](https://community.gravityforms.com/t/populating-fields-from-a-database/1885/2 "2019-05-20T17:19:13Z")

</div>

HI Ben !

We had a similar use case need, and I wound up writing a plugin to provide a number of useful capabilities. Perhaps it can also solve your requirements ?

Quick initial question for you: Your clients fill out your contact form anonymously or are they logged into WP with their user account ?

Below is my description from its Readme file - note this is currently in beta testing, and not officially released yet.

Cheers,  
-JAS

* * *

## Ref: Shared Fields - A WordPress / Gravity Forms Plugin

This Gravity Forms plugin provides a means to “share” field data amongst all forms on all pages within the same web site. Additionally all entered field values remain “sticky” in that each field’s entries will remain pre-populated when rendered - including fields sharing the same Admin Label name on other pages.

The Shared Fields plugin provides this capability by saving your form field data, and replacing all custom merge tags with the associated saved values.

All submitted form field data is saved via one of two possible ways:

1. Directly into the logged-in user’s meta data table on the server.
2. Inserted into the anonymous user’s global `$_SESSION` array.

This capability provides a means to pre-populate any field of any type which supports merge tag substitutions (like inserting saved field entry values into HTML blocks used to create a PDF, constructing custom messages with captured entry data, or pre-loading a hidden field’s default value to support “Conditional Logic” dynamics).

---

<div class="post-metadata">

**Author:** ![user5a7835188bee93.7](https://avatars.discourse-cdn.com/v4/letter/u/46a35a/32.png) [@user5a7835188bee93.7](https://community.gravityforms.com/u/user5a7835188bee93.7)\
**Post date:** [May 23, 2019, 11:52am UTC](https://community.gravityforms.com/t/populating-fields-from-a-database/1885/3 "2019-05-23T11:52:47Z")

</div>

Hi James

This sounds great! at the moment they have to pass through a contact form to be redirected to a quote builder, so they are not logged in users as such. I will lookin to creating users as I would like to build a cleint area so that they can view and make changes to thier quotations in real time.

Thanks

Ben

---

<div class="post-metadata">

**Author:** ![JASCoder](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/jascoder/32/1147_2.png) [@JASCoder](https://community.gravityforms.com/u/JASCoder)\
**Post date:** [May 23, 2019, 5:47pm UTC](https://community.gravityforms.com/t/populating-fields-from-a-database/1885/4 "2019-05-23T17:47:58Z")

</div>

Greetings again Ben

I have to start out by saying how amused I am about your application needs, because it is almost exactly the idea I had come up with for creating a demo for my new plug-in !

My original idea was going to be called: “My Banquet Planner” where one would enter in the time, location, contacts, all the course menus, staff requirements etc. etc. And at the end they would print out a list of tasks in a timeline of all the events for the meal’s serving order and so forth.

In the end I realized this was gonna be way too ambitious for just a demo, and I would never get around doing it. So I compromised and just made a little demo of just an interactive dinner planner showing off some of the features and tricks one can do with Gravity Forms and my “shared fields” enhancement module.

You’re welcome to check it out if you’d like:

[https://wp.www-net.com/awn-wp-dev-homepage/gf-mfsfs-demo-multi-form-dinner-menu-planner](https://wp.www-net.com/awn-wp-dev-homepage/gf-mfsfs-demo-multi-form-dinner-menu-planner)

If you have an interest to participate in the beta testing, just drop me a note with your contact info via direct message and I’ll get you set up.

Cheers,

-JAS

---

<div class="post-metadata">

**Author:** ![user5bfc6f45a9e7c5.8](https://avatars.discourse-cdn.com/v4/letter/u/dbc845/32.png) [@user5bfc6f45a9e7c5.8](https://community.gravityforms.com/u/user5bfc6f45a9e7c5.8)\
**Post date:** [March 6, 2020, 1:40am UTC](https://community.gravityforms.com/t/populating-fields-from-a-database/1885/5 "2020-03-06T01:40:24Z")

</div>

Hi there,

I’m interested too. Is it possible this plugin may be able to pull data from entries of other forms in the DB? I need to implement a series of fields that will be for admin use only & are populated from another form that anonymous users fill out in order to access other forms. I don’t want them to have to keep duplicating the same data every time they use a different form…

---

<div class="post-metadata">

**Author:** ![tcgsa](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/tcgsa/32/1057_2.png) [@tcgsa](https://community.gravityforms.com/u/tcgsa)\
**Post date:** [March 6, 2020, 6:12am UTC](https://community.gravityforms.com/t/populating-fields-from-a-database/1885/6 "2020-03-06T06:12:23Z")

</div>

Hi James, I would be interested in participating in beta testing as well, if that would be ok?

Cheers,

Phil

---

<div class="post-metadata">

**Author:** ![david](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/david/32/2517_2.png) [@david](https://community.gravityforms.com/u/david)\
**Post date:** [March 17, 2020, 12:38pm UTC](https://community.gravityforms.com/t/populating-fields-from-a-database/1885/7 "2020-03-17T12:38:39Z")

</div>

We (Gravity Wiz) have a couple of very powerful solutions for this. For populating existing entry data back into the form, I would recommend Easy Passthrough:

> **[Gravity Forms Easy Passthrough - Gravity Wiz](https://gravitywiz.com/documentation/gravity-forms-easy-passthrough/)**
>
> Transfer data between Gravity Forms forms with ease. This time-saving, secure plugin is a must-have for anyone working with multiple forms.

With this plugin, when you send them a link to the booking form, you could include a simple token that will handle populating any data you specify in the Easy Passthrough settings.

[https://example.com/booking-form/?ep\_token=](https://example.com/booking-form/?ep_token=){Easy Passthrough Token}

Now, if you want to populate a list of your services on different forms without having to update each when you add a new service, that’s where our Populate Anything perk shines.

> **[Gravity Forms Populate Anything - Gravity Wiz](https://gravitywiz.com/documentation/gravity-forms-populate-anything/)**
>
> Dynamically filter and populate field choices and values with posts, users, taxonomies, terms, Gravity Forms entries, and databases. Pretty much anything!

---

<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 4, 2022, 5:12pm UTC](https://community.gravityforms.com/t/populating-fields-from-a-database/1885/8 "2022-01-04T17:12:29Z")

</div>

Closed on January 4, 2022, 5:12pm UTC


