• Hi,

    I used a custom function to map the GF list type to a ACF repeater field. The data is being correctly inserted into the repeater field which I can view in WP Admin. However, it’s not being displayed automatically in my post. When I update the post manually, it displays.

    I’m also using a redirect in the confirmation to automatically take the user to the new post when the form is submitted.

    Is there a different hook that would create the post after the post is saved, OR another way to update the post, then post it?

    Thank you!

    https://wordpress.org/plugins/gravity-forms-custom-post-types/

Viewing 1 replies (of 1 total)
  • Thread Starter aself

    (@aself)

    I’m not sure how to edit my original post so I’m adding the following for clarification:

    I’m using the Gravity Forms + Custom Post Type plugin plus ACF to collect information and automatically generate a post from it. The user is automatically shown the newly generated post via a redirect confirmation.

    The form has a list type in GF that maps to a repeater field in ACF. I’m using a function (gfToAcfListToRepeater) that I found on gist to unserialize the values in the list field and assign them to the repeater field which is working great.

    The problem is that the the values in the repeater field are not being displayed initially on the newly generated post even though they are in the correct fields on the Edit page (in Admin). If I manually update the post (in Admin) and refresh the page (in the browser), the values display correctly.

    The function runs on gform_after_submission and I’m wondering if the post is created before the values are inserted into the repeater field. How can I either program saving the post automatically or is there a better way to accomplish this?

    Thanks!!

Viewing 1 replies (of 1 total)

The topic ‘Update Post after gform_after_submission function’ is closed to new replies.