Support

Account

Home Forums ACF PRO acf_form Use form but prevent post and post_meta creation Reply To: acf_form Use form but prevent post and post_meta creation

  • I’m not sure the above works anymore. I keep running into empty posts created and can only be deleted from the database.

    The ACF method pre_save_post expects something numeric OR ‘new_post’ so what I do is pass neither of those things but instead 'post_id' => 'no_new_post' which seems to work. I also use acf/save_post hook at a priority less than 10 ( in my case 4 ).

    I also get errors when unsetting $_POST['acf'] so I’ve been opting to use $_POST['acf'] = array();

    Undefined index: acf in advanced-custom-fields-pro\includes\acf-form-functions.php on line 157