Support

Account

Home Forums General Issues Editing an ACF field and submitting in $_POST Reply To: Editing an ACF field and submitting in $_POST

  • As far as I know it should be the same throughout all versions. You could turn on error log debugging and use the acf/save_post hook to error log your $_POSTed values and see where your fields are:

    /**
     * Error log processing ACF form saves
     *
     * @param Mixed $post_id
     *
     * @return void
     */
    function prefix_acf_save_post( $post_id ) {
    
    	// Don't run on the admin panel, front-end forms only
    	if( is_admin() ) {
    		return;
    	}
    
    	error_log( sprintf( 'Front-end Save Post: %1$s', $post_id ) );
    	error_log( print_r( $_POST, 1 ) );
    
    }
    add_action( 'acf/save_post', 'prefix_acf_save_post', 9 );