I am trying to create a custom add-on for Caldera Forms. So basically I am creating a processor for Caldera Forms. In that add-on when someone tries to submit the form it should show a custom error. So for that I have done my code like this
add_filter( 'caldera_forms_get_form_processors', 'wpcfmu_register_processor' );
function wpcfmu_register_processor() {
$processors['wp_cf_mu_integration'] = array(
"name" => __('Custom Integration'),
"description" => __("Custom Plugin"),
"author" => 'test',
"pre_processor" => 'wpcfmu_pre_process',
);
return $processors;
}
function wpcfmu_pre_process($config, $form, $process_id) {
$error = 'something happened wrong';
return array(
'note' => $error,
'type' => 'error'
);
}
But here no such is showing at all. I have tried to change the code but anyhow its showing the success message. Can someone tell me what going wrong here?
Any help and suggestion will be really appreciable.