# EventType

## Overview

This is a class that represents the events in the solution.\
This can be the build in events (mostly form events) like EventType.onShow\
But also custom events that are added via the Solution eventTypes property.

## Constants Summarized

| Type                                                                                       | Name                                                | Summary                                                                                            |
| ------------------------------------------------------------------------------------------ | --------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| [EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype) | [onBeforeHide](#onbeforehide)                       | The form onBeforeHide event, fired when the form is about the be hidden.                           |
| [EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype) | [onBeforeRecordSelection](#onbeforerecordselection) | The form onBeforeSelection event, fired when the form's foundset is about to change its selection. |
| [EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype) | [onElementDataChange](#onelementdatachange)         | The form onDataChange event, fired when the form element data is changed.                          |
| [EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype) | [onElementFocusGained](#onelementfocusgained)       | The form onElementFocusGained event, fired when the form element gets focus.                       |
| [EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype) | [onElementFocusLost](#onelementfocuslost)           | The form onElementFocusLost event, fired when the form element loses its focus.                    |
| [EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype) | [onHide](#onhide)                                   | The form onHide event, fired when the form is hidden.                                              |
| [EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype) | [onLoad](#onload)                                   | The form onLoad event, fired when the form is loaded/created.                                      |
| [EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype) | [onRecordEditStart](#onrecordeditstart)             | The form onRecordEdit event, fired when a record of a form is going into edit mode.                |
| [EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype) | [onRecordEditStop](#onrecordeditstop)               | The form onRecordStop event, fired when the a record of a form is going out of edit mode.          |
| [EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype) | [onRecordSelection](#onrecordselection)             | The form onSelection event, fired when the form's foundset selection is changed.                   |
| [EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype) | [onResize](#onresize)                               | The form onResze event, fired when the form is resized.                                            |
| [EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype) | [onShow](#onshow)                                   | The form onShow event, fired when the form is shown.                                               |
| [EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype) | [onSort](#onsort)                                   | The form onSort event, fired when the form's foundset is sorted                                    |
| [EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype) | [onUnload](#onunload)                               | The form onUnLoad event, fired when the form is being unloaded/destroyed.                          |

## Methods Summarized

| Type                                                                           | Name                                | Summary |
| ------------------------------------------------------------------------------ | ----------------------------------- | ------- |
| [String](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/string)   | [getDescription()](#getdescription) |         |
| [String](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/string)   | [getName()](#getname)               |         |
| [Boolean](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/boolean) | [isDefaultEvent()](#isdefaultevent) |         |

## Constants Detailed

### onBeforeHide

The form onBeforeHide event, fired when the form is about the be hidden.

**Type**\
[EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype)

### onBeforeRecordSelection

The form onBeforeSelection event, fired when the form's foundset is about to change its selection.

**Type**\
[EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype)

### onElementDataChange

The form onDataChange event, fired when the form element data is changed.

**Type**\
[EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype)

### onElementFocusGained

The form onElementFocusGained event, fired when the form element gets focus.\
If you start listener to these events then these will only fire for new created forms,\
Existing forms will not start firing the focus gained events, because the handlers are not set (recreateUI will fix this)

**Type**\
[EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype)

### onElementFocusLost

The form onElementFocusLost event, fired when the form element loses its focus.\
If you start listener to these events then these will only fire for new created forms,\
Existing forms will not start firing the focus list events, because the handlers are not set (recreateUI will fix this)

**Type**\
[EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype)

### onHide

The form onHide event, fired when the form is hidden.

**Type**\
[EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype)

### onLoad

The form onLoad event, fired when the form is loaded/created.

**Type**\
[EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype)

### onRecordEditStart

The form onRecordEdit event, fired when a record of a form is going into edit mode.

**Type**\
[EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype)

### onRecordEditStop

The form onRecordStop event, fired when the a record of a form is going out of edit mode.

**Type**\
[EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype)

### onRecordSelection

The form onSelection event, fired when the form's foundset selection is changed.

**Type**\
[EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype)

### onResize

The form onResze event, fired when the form is resized.

**Type**\
[EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype)

### onShow

The form onShow event, fired when the form is shown.

**Type**\
[EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype)

### onSort

The form onSort event, fired when the form's foundset is sorted

**Type**\
[EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype)

### onUnload

The form onUnLoad event, fired when the form is being unloaded/destroyed.

**Type**\
[EventType](https://docs.servoy.com/reference/servoycore/dev-api/events-manager/eventtype)

## Methods Detailed

### getDescription()

**Returns:** [String](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/string) the event description

### getName()

**Returns:** [String](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/string) the name

### isDefaultEvent()

**Returns:** [Boolean](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/boolean) whether is default (Form level) or custom event type (added via Solution eventTypes property)

***


---

# 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.servoy.com/reference/servoycore/dev-api/events-manager/eventtype.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.
