# 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>](/develop/react/api-guide/form.md) component.

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.feathery.io/develop/react/api-guide/form/event-handlers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
