The onFormsSuccess handler lets you modify the success message output of a submitted form.
<?php
$_LW->REGISTERED_APPS['my_app']=[
'title'=>'My App',
'handlers'=>['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;
}
}
?>