Home Forums Front-end Issues get_field interrupts acf_form


get_field interrupts acf_form

  • Not sure if this is supposed to be this way, or if anybody else has noticed/reported it before, but I noticed that in one of my scripts that calls the acf_form function to show the form on the front, if there is a get_field call that returns anything but ‘null’ then the form cannot get the metadata from the post and the result is an empty form (expect for post title).

    Example… if I have get_field(‘field_name’,$post->ID) (which returns the field as expected) and later in the script I call acf_form and pass $post->ID to it the form is empty.

    If I remove that get_field call then the form is populated with the correct data.

    I even tried to hard code the post ID in the acf_form and had the same result.

    Is there something I am unaware of as to why the get_field call would cause issues with acf_form?


  • When you set the post ID used by ACF form then it will show data that is entered for that post and not the current post that is associated with the current page. If that post has no values then none will be shown.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.