Support

Account

Home Forums Front-end Issues Best way to associate form submittal with specific form in acf/save_post action Reply To: Best way to associate form submittal with specific form in acf/save_post action

  • I ended up changing this to a pre-save filter (I needed to change some of the values) and I looked for specific custom fields and called my mail functions from there.

    function custom_acf_pre_save_post($post_id) {
    	if($_POST['acf']['field_5a0dc6820fd89'] && ($_POST['acf']['field_5a0dc6820fd89'] != get_field('custom_field', $post_id)){
    		//wp_mail code here...
    	}
    	return $post_id;
    }
    add_filter('acf/pre_save_post' , 'custom_acf_pre_save_post', 10, 1);