// look in apps/common/extensions/list-form-custom-webhooks/ListFormCustomWebhooksExt.php for detailed usage
if ($this->isAppName('frontend')) {
Yii::app()->hooks->addAction('frontend_controller_lists_before_action', function($action){
if (!in_array($action->id, ['subscribe_confirm'])) {
return;
}
if (!$action->getController()->asa('callbacks')) {
return;
}
// after the form has been saved successfully, run this function:
$action->getController()->callbacks->onSubscriberSaveSuccess = function($event){
// do whatever you wish with the form fields
$formFields = Yii::app()->request->getPost(null);
};
});
}