Support

Account

Home Forums ACF PRO Are there JS triggers for when an acf_form() is submitting/completed/failed? Reply To: Are there JS triggers for when an acf_form() is submitting/completed/failed?

  • Perfect, thank you! The first part of your answer solved my question. I kept my .click() method and then added the following:

    acf.add_filter('validation_complete', function( json, $form ){
    	if (json.errors) {
    		showLoadingBlocker(false);
    	}
    	
    	return json;
    });

    I realise I couldn’t do anything exclusively with JS after the form submission had gone through and the page redirected, but all I was really looking for was that kind of JS error handler.