Skip to main content

On Exit

Last updated 27/03/2026

Overview

The On Exit event is a client-side event that executes when a user leaves a form field. This typically occurs when the user clicks away from the field or navigates to another field using the keyboard, allowing the application to respond right after the user finishes interacting with the field.

How it Works

When a user exits a field:

  1. The field loses focus.
  2. The On Exit event executes.
  3. Any associated logic runs after the user has finished entering data.

Use Cases

  • Validate the field's value after input
  • Trigger calculations based on the user's entry

Example

This function executes when the user exits the Price field, automatically calculating the total by multiplying the Quantity and Price fields and updating the Total field.

JavaScript
Calculate total on exit
function CalculateTotal(five, context, result) {
five.field.Total = five.field.Quantity * five.field.Price;
return five.success(result);
}