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.