# Populate ACF custom fields with Advanced Post Creation GF add-on

**URL:** <https://community.gravityforms.com/t/populate-acf-custom-fields-with-advanced-post-creation-gf-add-on/2357>\
**Category:** Get Help\
**Tags:** apc, acf, advanced-post-creation\
**Created:** [July 30, 2019, 9:49am UTC](https://community.gravityforms.com/t/populate-acf-custom-fields-with-advanced-post-creation-gf-add-on/2357 "2019-07-30T09:49:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tomcap](https://avatars.discourse-cdn.com/v4/letter/t/b782af/32.png) [@Tomcap](https://community.gravityforms.com/u/Tomcap)\
**Post date:** [July 30, 2019, 9:49am UTC](https://community.gravityforms.com/t/populate-acf-custom-fields-with-advanced-post-creation-gf-add-on/2357/1 "2019-07-30T09:49:43Z")

</div>

Hi everyone,

Everything in the topic title :). A little more detail though :

I have a **custom post type** , called _Estimate_.  
A set of **ACF custom fields** has been added to this custom post type.

I use the _Advanced Post Creation_ Add-on to create a new _Estimate_ thanks with GF. So far, so good ! Post is created, with valid title & content.

Then I tried to **map my GF fields to the existing ACF custom fields** (in the Post Creation section), but none of the ACF fields is mentionned in the _Select a Custom Field Name_ drop down menu…  
So I tried _Add New Custom Field Name_, carefully typed in every ACF field name in front of the corresponding GF value, but the **ACF fields remain empty when a new post is created**.

Am I missing something obvious, does someone have an idea ?

Any help would be apreciated 🙂

---

<div class="post-metadata">

**Author:** ![Tomcap](https://avatars.discourse-cdn.com/v4/letter/t/b782af/32.png) [@Tomcap](https://community.gravityforms.com/u/Tomcap)\
**Post date:** [July 30, 2019, 12:13pm UTC](https://community.gravityforms.com/t/populate-acf-custom-fields-with-advanced-post-creation-gf-add-on/2357/2 "2019-07-30T12:13:31Z")

</div>

After a couple of extra tests, interesting thing :  
I tried to display the **vanilla Wordpress custom fields** , deactivated by ACF, and [thanks to this link](https://www.wpbeginner.com/wp-tutorials/how-to-fix-custom-fields-not-showing-in-wordpress/).

And surprise, these custom fields are properly populated by the data coming from GF and _Advanced Post Creation Add-on_ !

So the problem is, how do I get GF to map ACF fields instead of the “classic” ones ?

---

<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:** [July 30, 2019, 1:28pm UTC](https://community.gravityforms.com/t/populate-acf-custom-fields-with-advanced-post-creation-gf-add-on/2357/3 "2019-07-30T13:28:04Z")

</div>

If you have the custom field names correct, Gravity Forms can store the data there, no matter who created the key or registered the post type.

Try creating an Estimate post in the normal manner, using those custom fields, to store some data there. Once they are used, they’ll show up in the drop down in the Post Creation feed.

It’s usually just that the key name does not match exactly, when typing it in.

---

<div class="post-metadata">

**Author:** ![uamv](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/uamv/32/1412_2.png) [@uamv](https://community.gravityforms.com/u/uamv)\
**Post date:** [July 30, 2019, 5:14pm UTC](https://community.gravityforms.com/t/populate-acf-custom-fields-with-advanced-post-creation-gf-add-on/2357/4 "2019-07-30T17:14:25Z")

</div>

Also, depending on the complexity of the ACF field (maybe dates, repeaters and such), they may be stored differently in the database than the way in which Gravity Forms is providing the data. I’ve only just begun using the Advanced Post Creation add-on—look forward to doing so more. Prior to its availability, I had put together [this script](https://gist.github.com/uamv/a7958dc9df37ca41514a4bddb697497a) for sending certain GF fields to ACF fields.

---

<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:** [July 30, 2019, 7:05pm UTC](https://community.gravityforms.com/t/populate-acf-custom-fields-with-advanced-post-creation-gf-add-on/2357/5 "2019-07-30T19:05:28Z")

</div>

Good point @uamv. The data you collect in the form and the ACF field you are using the store the data need to agree on the same data format.

---

<div class="post-metadata">

**Author:** ![Tomcap](https://avatars.discourse-cdn.com/v4/letter/t/b782af/32.png) [@Tomcap](https://community.gravityforms.com/u/Tomcap)\
**Post date:** [July 31, 2019, 6:46am UTC](https://community.gravityforms.com/t/populate-acf-custom-fields-with-advanced-post-creation-gf-add-on/2357/6 "2019-07-31T06:46:47Z")

</div>

Thank you guys for these replies.  
The ACF fields used in this case are pretty straight-forward : text, check-boxes…

Joshua, I’ll try to dive into your script (a bit advanced for my level ^^), but for now, I think I’ll stick with the classic custom fields & GF.

Thanks again, it’s my first post on this forum and since I love GF, I’ll probably be back soon 🙂

---

<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:** [October 8, 2021, 2:05am UTC](https://community.gravityforms.com/t/populate-acf-custom-fields-with-advanced-post-creation-gf-add-on/2357/8 "2021-10-08T02:05:33Z")

</div>


