« All Handlers

onFormsSuccess

The onFormsSuccess handler lets you modify the success message output of a submitted form.

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

class LiveWhaleApplicationMyApp {

public function onFormsSuccess($buffer, $form_id) {
global $_LW;
// use the $form_id to only apply this validation to a certain form, or perhaps
// track the presence of a field name in $_LW->_POST
if ($form_id === 6) {
// modify the output
}
return $buffer;
}

}
?>