# Event Handlers

Custom event handlers, in the form of callback functions, are a powerful way for you to run custom code at critical moments when the user interacts with your Feathery form. They allow you to completely control and modify the default behavior of the form.

Pass your callback functions in directly as props of your [\<Form>](https://docs.feathery.io/develop/react/api-guide/form) component.

|       Prop       |         Type        | Description                                                                                                                                                                                                      |
| :--------------: | :-----------------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|    `onSubmit`    | `optional function` | Callback function on successful step submission. [Full reference](https://docs.feathery.io/develop/react/api-guide/form/event-handlers/onsubmit)                                                                 |
| `onFormComplete` | `optional function` | Callback function run when the entire form completes. [Full reference](https://docs.feathery.io/develop/react/api-guide/form/event-handlers/onformcomplete)                                                      |
|     `onLoad`     | `optional function` | Callback function run when each form step loads. [Full reference](https://docs.feathery.io/develop/react/api-guide/form/event-handlers/onload)                                                                   |
|     `onError`    | `optional function` | Callback function run when an error occurs in the form. [Full reference](https://docs.feathery.io/develop/react/api-guide/form/event-handlers/onerror)                                                           |
|    `onChange`    | `optional function` | Callback function run when a field value changes. [Full reference](https://docs.feathery.io/develop/react/api-guide/form/event-handlers/onchange)                                                                |
|    `onAction`    | `optional function` | Callback function triggered when the user clicks a button configured to perform a custom action. [Full reference](https://docs.feathery.io/develop/react/api-guide/form/event-handlers/onaction)                 |
|     `onView`     | `optional function` | Callback function run when an element, specified with `onViewElements`, enters or leaves your current screen view. [Full reference](https://docs.feathery.io/develop/react/api-guide/form/event-handlers/onview) |
| `onViewElements` |   `optional array`  | String array consisting of the element IDs that you want to track with `onView`.                                                                                                                                 |
