Handlers are what drive custom module development in LiveWhale. In a sense, every handler is a window of opportunity in the CMS’s operation into which you can insert custom code. Any custom module will use one or more handlers.
For a primer, check out the user guide Introduction to Custom Module Development.
Click the name of a handler below for information and code examples.
| Name | Description | Arguments | Scope |
|---|---|---|---|
| onAfterPublicSubmission | Fires immediately after an item is created by a public submission form | $data_type, $last_id | Front-end |
| onAfterSave | Fires immediately after any piece of content gets saved | $type, $id | Back-end |
| onAfterSync | Fires immediately after an item is created or updated that originates from a synced source | $type, $subscription_id, $event_id, $mode, $item | Back-end |
| onBeforeDelete | Fires before a saved item is deleted | $data_type, $id | Back-end |
| onBeforeOutput | Filters an entire page’s contents at runtime (before widgets parsed) | $buffer | Front-end Back-end |
| onBeforePagesSaveFilter | Filters page content before saving | $buffer | Front-end |
| onBeforeSync | Fires immediately before an item is created or updated that originates from a synced source | $type, $subscription_id, $buffer | Back-end |
| onBeforeValidate | Fires before a saved item is validated | $data_type, $id | Back-end |
| onCalendarDetailsFormat | Filters variables before they are placed into a calendar event details view | $vars | Front-end |
| onCSVOutput | Filters an exported CSV | $data_type, $rows | Back-end |
| onCustomFields | Allows for adding Custom Fields from within custom module code (LiveWhale 3.0+) | $buffer | Front-end Back-end |
| onFormatMessageVars | Filters variables before they are placed into a message or email | $vars | Front-end Back-end |
| onFormatPublicSubmission | Filters a public submission before it’s saved | $data_type, $buffer | Front-end |
| onFormsSubmission | A form created in the forms module was submitted | $id | Front-end Back-end |
| onFormsSuccess | Filters the success message output of a submitted form | $buffer, $form_id | Front-end |
| onFormsSuccessData | Fires immediately after a form created in the forms module was successfully submitted | $data, $form_id | Front-end |
| onInputFilter | Allows for input filters (for custom WYSIWYG fields) to be added to the security module | Front-end Back-end | |
| onLoad | Runs on page load for any front- or back-end view | none | Front-end Back-end |
| onOutput | Filters an entire page’s contents at runtime (after widgets parsed) | $buffer | Front-end Back-end |
| onValidatePaymentsForm | Validates an event RSVP submission | $post | Front-end |
| onValidatePublicSubmission | Validates a public submission | $data_type | Front-end |
| onValidateUpload | Validates content before it’s uploaded | $data_type, $info | Back-end |
| onWidgetFormat | Filters a widget’s variables before they are displayed | $type, $handler, $buffer | Front-end |
LiveWhale Support