Uploading Files to Advanced Custom Fields Using the Gravity Forms Advanced Post Creation Add-On

This article requires the Gravity Forms Media Library perk.

Buy Gravity Perks to get this perk plus 46 other premium Gravity Forms plugins!

View Plugin Buy Gravity Perks

In this simple tutorial, we will show you how to map uploaded files or images to an Advanced Custom Field using the Gravity Forms Advanced Post Creation Add-On and GF Media Library. Let’s get started.


Looking to upload files to Advanced Custom Fields without the APC Add-On? We have an article that walks you through it.

Steps

  1. Add an Image or File Custom Field with Advanced Custom Fields
  2. Add File Upload Field to Your Form
  3. Set Up Advanced Post Creation Feed

Step 1 – Add an Image or File Custom Field with Advanced Custom Fields

Start by adding a File, Image, or Gallery Advanced Custom Field. Make sure to set the Return Value to File ID or Image ID.

Step 2 – Add File Upload Field to Your Form

Add a File Upload field to your form and activate GF Media Library in the Perks tab.

If you’re planning on mapping the field to an Image Gallery, check Enable Multi-File Upload in the General tab.

GF File Upload Pro

Enhance File Upload fields with image previews, cropping, and more using Gravity Forms File Upload Pro.

Step 3 – Set Up Advanced Post Creation Feed

Navigate to the Advanced Post Creation Feed settings and add a new Feed. Scroll down to Custom Fields and map your ACF custom field to your File Upload field.

If your Custom Field hasn’t been used before, it won’t be available in the Drop Down. Simply scroll to the bottom and select “Add New Custom Field Name”, then paste in the Field Name from the ACF Settings.

That’s It!

Once the field is mapped, any post created with the form will automatically map to the appropriate ACF field.

Comments

  1. Timothy Wood
    Timothy Wood March 19, 2024 at 10:15 am

    Has anyone solved where a mutli-file upload on a gravity form only attaches the last file to the ACF file field (even when ACF field is set to allow multiple files)

    Reply
    1. Dario
      Dario March 19, 2024 at 10:51 am

      Hi Tim, this tutorial should work for uploading files to File ACF field. If you are using a File Upload ACF field it won’t work. If you need further assistance, please reach out through our support form.

  2. Todd
    Todd February 2, 2024 at 1:51 pm

    I’m trying to add an image from a user’s profile (an ACF field called “Company Logo”) to my Gravity Form. I’d like for the image to display as an HTML field so that it can be passed to the Advanced Post Creation add-on to eventually end up in a WP Job Manager post. Is this possible, or does anyone from GravityWiz have a better idea of how to implement something like this?

    Reply
    1. David Smith
      David Smith Staff February 3, 2024 at 7:24 am

      This article won’t help you but here are a couple ideas. I’m assuming you want to show a preview of the post on the frontend and then actually capture that content in the generated post body as well? If so, you’ll want to generate everything in a Paragraph Text field since Gravity Forms won’t capture content in an HTML field on submission. You can then use a Live Merge Tag to copy the contents from the Paragraph Text field to an HTML field to act as your frontend preview.

      To get the image URL and output it as an image, something like this in your Paragraph Text field should do the trick:

      <img src="{user:your_image_key}">

  3. Marius
    Marius December 22, 2023 at 6:00 pm

    Hello There! I am trying to get some help, I am using Advanced Post Creation Add-on within the form to pass the data in a wordpress post , since I am using Divi, i cannot use the Post Feed feature due to layout issues, my question is: is there any way display the images uploaded via multiple upload field as a image gallery in the post? so far I have the perk to attach the uploaded images via media library but I tried anything and couldn’t make it work. any suggestions please?

    Reply
    1. David Smith
      David Smith Staff January 13, 2024 at 7:22 am

      Hey Marius, never heard back from you on our last email exchange. Would love to help you with this via support. 🙂

  4. Thomas Finger
    Thomas Finger July 31, 2023 at 11:13 am

    Hi! I´m just working on a user profile update form. The user should be able to upload some images to his profile. My question: Will it work when the ACF Fields are on user.php? Best, Tom

    Reply
    1. Samuel Bassah
      Samuel Bassah Staff July 31, 2023 at 12:30 pm

      Hi Thomas,

      If the ACF Fields are on the User page, then the GF Advanced Post Creation Addon won’t work. You may need to try the GF User Registration Addon and set up an update user feed on the form with the custom field mappings.

      Best,

  5. Bryant Grant
    Bryant Grant June 24, 2023 at 5:25 pm

    Need to leave or give a person a setting to KEEP media in the media library even if the entry is deleted.

    Why delete an uploaded image during post creation, in the media library just because the GF entry is being deleted?

    Reply
  6. Bryant Grant
    Bryant Grant June 24, 2023 at 4:28 pm

    Works.. but problem is image is not “attached” to the CPT. BUT.. I do love the fact that your upload method brings all of the image metadata like keywords etc with it!

    Reply
    1. Samuel Bassah
      Samuel Bassah Staff June 26, 2023 at 9:27 am

      Hi Bryant,

      Glad it’s working for you. Use this snippet to attach the image to the post. If this doesn’t work for you, contact us via our support form so we can look at your setup and assist you further.

      Best,

  7. Martin Hult
    Martin Hult August 24, 2021 at 1:14 pm

    Hey guys,

    I’m doing it all. And the files are not uploaded to the media library nor adding to the custom field type I’ve med with the FileID.

    I’ve created the Advanced Post creation feed and mapped every custom field to the correct value and so on. Just don’t get why I don’t get the files in side. The post is created and all the other data is coming over so to speak. But not the files.

    any idea?

    Reply
    1. Dario Space
      Dario Space August 24, 2021 at 1:27 pm

      Hi Martin,

      When testing locally it seems to be working. Have you installed GF Media Library Perk and activated it for the File Upload Field?

      If you have an active Gravity Perks License, you can get in touch with us via our support form with your account email address and we’ll be happy to dig into this further.

      Best,

  8. Dan
    Dan January 21, 2021 at 4:43 pm

    This plugin looks amazing.

    I’m working for a made-to-order sauna manufacturer. They’d like to attach images to an order, e.g.: * Customer’s sketch * Company’s Layout drawing * Company’s Elevation drawing

    Question: So this Perk works in Woo Orders too, yes?

    Side question: They’re looking at building a staffs’ dashboard. They’d go there to review orders with data like above + other functionality. Looking for any plugins/documents/videos that help create such WooC date dashboards — suggestion appreciated!

    Also curious if there’s a plugin that puts order future production dates on a calendar. Thx in advance for any directions or pointers

    Reply
    1. Samuel Bassah
      Samuel Bassah Staff January 22, 2021 at 5:40 am

      Hi Dan,

      We do not have a solution to put dates on a calendar or create WooCommerce Date Dashboards. Gravity Forms Advanced Post Creation Add-on is a product of Gravity Forms, so you may want to get in touch with their support to see if they have a solution for this. This however looks like something you’ll need some custom coding to achieve. In case you heed a developer you can hire one from codeable

      Best,

  9. Kevin Tutt
    Kevin Tutt January 7, 2021 at 6:14 pm

    Have you people actually tried this using ALL ACF fields? Like, this information really needs some fine tuning. this is not that simple.

    Reply
    1. Samuel Bassah
      Samuel Bassah Staff January 8, 2021 at 8:38 am

      Hi Kevin,

      Unfortunately, we’ve not tested ALL ACF Fields with this setup but this tutorial focuses on the use of a Single File upload field to upload a file to an ACF file field. We’ve received your ticket and I’ve replied to you. The issue you’re experiencing is partly because your ACF fields are within an ACF Group. Since you’ve sent a ticket, I will continue assisting you via the ticket.

      Best,

  10. Daniel Naef
    Daniel Naef July 16, 2020 at 2:16 am

    Is it possible to assign the upload(s) to the post, because now only the files are added to the media library, without an assignment to the created post.

    Without using Media Library GP, i.e. only with the “core Post Creation Media Library setting”, the files will be associated with the post but not displayed within ACF :-(

    Neither of these is usable for me, it either does not work with ACF or does not link the upload to the post

    because I would like to use a pre-filled ACF (Gallery Field) and want to limit uploads to the active post in ACF fields, the missing assignment is a problem ;-)

    Reply
  11. Andrew Clark
    Andrew Clark June 20, 2020 at 2:04 pm

    This might be a silly question but does this work for Pods Framework Pods, too? If so, does it include all the Pods Types (post types, taxonomies, meta custom fields, table custom fields, advanced post types, etc)?

    Reply
    1. Ryan Donovan
      Ryan Donovan June 21, 2020 at 3:45 am

      Hey Andrew, we recently made an update to our Media Upload plugin to have better support for the Pods custom fields. Mapping with a custom post type should work correctly. Of course, if you run into any issues, you are always welcome to reach out to us through our support. 😃

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.

Grab a bundle of free Gravity Forms plugins

Enter your email and receive our most popular free plugins and snippets, plus access to hundreds of others.

This field is for validation purposes and should be left unchanged.