Support

Account

Home Forums General Issues acf_form Validation in Block Reply To: acf_form Validation in Block

  • Thanks, John. Sadly this solution didn’t work for me. My best guess is it’s because wp_doing_ajax() returns true both on the front end-submit and in the block editor.

    I’ve got around it though by using ACF JS and just returning return { valid: 1 }; JSON response for all forms and just loading that script in WP Admin.

    
    acf.add_filter('validation_complete', function( json, $form ){
    
    	// return
    	return { valid: 1 };
    });