Skip to main content

Introduction to Events

Last updated 18/03/2024

What are Events?

Events allow developers in Five to create workflows by triggering functions based on end-users actions. For example, sending an email when a button is clicked, using Five's On Click event; validating data using Five's On Validate event. Almost every UI component in Five comes with its own set of Events that can be used by developers.

Events also allow controlling the flow of your application. In the event your function returns an error, this will abort the current action Five is performing with the user. For example, during the saving of a form, if a function is attached to the Do Complete event it will return an error, the saving of the form and all its data will be aborted. The user will need to fix the identified issues and re-save.


To add events, you need a basic understanding of JavaScript and know how to interact with Five's API using JavaScript.

Type of Events

We have server-side events that are executed on the server and have direct access to the database, and client-side events that are executed in the browser.

DoServer-side events
OnClient-side events