Home Forums ACF PRO ACF autofill Post Object values using post ID


ACF autofill Post Object values using post ID

  • Dear,

    We are currently struggling with a autofill option using the Post Object field. What we have so far:

    We are using the acf_form to display the back-end editor in the front end of the page. The only thing we would like to add is a functionallity to autofill in the related posts to that discussion field, which we are using the post object for but currently it is a selectable field, what we would like is to autofill in that field by the post id (which we already have)

    Thanks in advanced!

  • You need to add an acf/prepare_field filter. In this filter your can populate $field['value'] with an array of post IDs that you want to set.

    You can do this only on the front end by adding a condition at the top of your filter

    if (is_admin()) {
      return $field;
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.