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.

<?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;
      }
   }
?>