> For the complete documentation index, see [llms.txt](https://docs.flexikanban.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flexikanban.ai/components/forms/tools/event.md).

# Event

To provide efficient interaction between the user and the form one can use the following events to trigger various form actions:

### Form/Nested form events

**onLoad** - occurs when form has been loaded

**onBeforeSave** - occurs before form has been saved (form standard 'Save' button or 'Save' form api action)

**onAfterSave** - occurs after form has been saved (form standard 'Save' button or API > 'Save' form action)

**onActivate** - occurs when form has been activated (Navigate > 'Return Back' form action or navigating back via breadcrumb for linked forms)

### Form input events

**onChange** - occurs when the value of an element has been changed

### Button events

**onClick** - occurs when a button is clicked

### List events

**onChange** - occurs when the value of any of list checkboxes has been changed.

### Form event setup

* Select the element on the form (1)
* Click "Add New" button (2)

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2F6yaMR4iF8PRdsh3M0Sf7%2Ffile.excalidraw.svg?alt=media&amp;token=092c28b8-c2a7-4e7c-b09e-b2e92f59f8ab" alt="" class="gitbook-drawing">

Provide required event details:

* Select event type (3)
* Provide conditions if necessary (4)
* Click "Add" button to tie actions to the event (5)
* Select existing actions (6) or click "+" icon to create new ones (7)
* Pass conditions if necessary (8)

Save changes.

<img src="https://3097383375-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FK2dgObBO5ydOH2ZXDJLa%2Fuploads%2FJTFdr4otOMkMKL5a9BcV%2Ffile.excalidraw.svg?alt=media&amp;token=4bcc5a74-bc39-48c1-afce-5f8f51b2af82" alt="" class="gitbook-drawing">


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flexikanban.ai/components/forms/tools/event.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
