Support

Account

Home Forums Backend Issues (wp-admin) Refresh form view after update_field

Unread

Refresh form view after update_field

    • simmsy

    • February 10, 2020 at 8:42 pm

    Hi

    In the backend of WordPress when I publish a custom post type which has ACF fields I make a call to an API to submit the data to a third party system. This is done in the ‘acf/save_post’ action hook.

    The API returns a unique identifier which I then save to the post in WordPress using ‘update_field’

    My issue is that in order to see the value in the form field the user needs to manually refresh the post edit page.

    How best to refresh the ACF form after the update_field operation.

    I’ve toyed with ‘wp_redirect’ and the ‘redirect_post_location’ filter hook to redirect back to the same post but none of those worked for me or I wasn’t doing it correctly.

    See this video for the issue in action – https://ttprivatenew.s3.amazonaws.com/pulse/nsimms/attachments/12468631/event_id_not_visible_til_refresh.mp4

    Thanks in advance,
    Simmsy.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.