Support

Account

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

Unread

Refresh form view after update_field

  • 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)

The topic ‘Refresh form view after update_field’ is closed to new replies.