Home › Forums › Front-end Issues › Unable to detect new_post on acf_form › Reply To: Unable to detect new_post on acf_form
OK, I think I have this, and it’s not a bug.
Fn your form arguments include
'post_id' => 'new_post',
Then ACF creates the new post automatically using the content of
'new_post' => array(
'post_type' => 'startups',
'post_status' => 'draft',
),
If you want to create a new post of the type startups
and you want to handle the details of this yourself in an acf/pre_save_post filter then in your form arguments use
'post_id' => 'new_startups',
and in the pre save post filter use this the test
if( $post_id != 'new'_startups )
I hope this explains things. It seems I was under the same impression you were from reading the documentation.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.