« All Handlers

onFormsSuccessData

Sometimes, your custom work might require acting on a form submission after it’s been successfully submitted, but before the data is saved. For this, use onFormsSuccessData.

If instead, you want to validate or customize a form submission as it’s being submitted, use onFormsSubmission.

To customize the success message after a form is submitted, use onFormsSuccess.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
$_LW->REGISTERED_APPS['my_app']=[
'title'=>'My App',
'handlers'=>['onFormsSuccessData'],
];

class LiveWhaleApplicationMyApp {

public function onFormsSuccessData($data, $form_id) {
global $_LW;
if ($form_id == 123) {
// do something custom to the received form $data
}
return $data;
}
}
?>