Closed ghost closed 7 years ago
I used a plugin based upon your example Mailchimp code:
`if(!class_exists('Forms3rdParty_Callbacks')): /**
Encapsulate any and all 3rd-party service callback functions */ class Forms3rdParty_Callbacks { public function __construct(){
//actions require 2 parameters: 3rd-party response, results placeholders
///NOTE: customize this hook name to match your Service (in the admin settings)
add_action('Forms3rdPartyIntegration_service_a0', array(&$this, '3rdParty_action'), 10, 2);
}//-- function __construct /**
} catch(Exception $ex){ $results['errors'] = array($ex->getMessage()); }
}//-- function 3rdParty_action
}//--- class Forms3rdParty_Callbacks //start 'em up $Forms3rdPartycallback_instance = new Forms3rdParty_Callbacks(); endif; //class-exists`
Thanks for this plugin. I am not able to add to the functions, and so prevented from using hooks. I wondered if there was a simple way of displaying the response in the success case?
I am using Contact Form 7, and there is an Additional Settings input for the form, where I can run JS in the success case, using on_sent_ok:
Could I utilise this to display the whole body response, written back to the form with JS?