Last updated 19/01/2026
FormPage Object
The
FormPage
object represents one page (or tab) within a form and is responsible for managing everything that happens on that specific page.
In Five, all events have an instance of the Five
object as the initial parameter, and this provides a function called
sender() : any
. Using this function we can get the current form page in many situations, below are scenarios depending on the appropriate event:
If you are in subforms, you can further call getParent()
to
move up the form hierarchy if needed.
What the FormPage Object Does
- Accessses fields on that page
- Refreshes the page when data changes
- Reacts to conditions that affect the page
- Acts as a scope (so you don't affect other pages)
Form
object - represents the entire formFormPage
object - represents a single page/tab inside the formFormField
object - represents the individual inputs on that page
How the FormPage Object Fits into an Application Flow
A typical lifecycle looks like this:
-
Form loads - and creates all FormPage instances internally.
-
FormPage
is accessed - a specific page is viewed giving you access to its logic and fields.
-
User interacts - by typing, selecting, or changing values.
-
Your code reacts - it runs the logic, updates other fields, and shows messages or errors.
-
Form saves - final validation occurs, and data passed to the backend or workflow.
Summary
The
FormPage
object represents a single page or tab within a form and is responsible for handling page-specific behavior. It reacts to user interaction
on that page, evaluates local rules and conditions, and refreshes the page to keep its fields up to date. By isolating logic to a single page, the FormPage
object
helps keep form behavior predictable, efficient, and easy to maintain, while the Form
object continues to manage the overall form lifecycle and submission.
Functions on the FormPage Object
The following functions are available on the
FormPage
object.
event()
The event()
is a function on the
FormPage
object that returns the ID of the event that caused the form event logic to run, such as OnSelecting
.
Effectively, it tells you why the form code is executing.
Available: Client
Return value: A string representing the ID of the event that triggered the form page logic.
Examples: event()
getCaption()
The getCaption()
is a function on the
FormPage
object
that returns the caption for the page. This is the user-visible caption of the page or tab as it appears in the form UI, for example, the text shown on the tab header.
Available: Client
Return value: A string representing the page caption.
Examples: getCaption()
getDataManager()
The getDataManager()
is a function on the
FormPage
object
that returns a DataManager
object associated with the FormPage
.
The
DataManager
object is responsible for handling the data layer behind the page, including how the field values are stored, retrieved, validated, and synchronized with
the form's underlying data model.
Available: Client
Function Signature
getDataManager() : DataManager;
Return value: A
DataManager
object that is associated to the FormPage
.
Examples: getDataManager()
getField()
The getField()
is a function on the
FormPage
object
that retrieves a specific field from a FormPage
by its unique field identifier. It allows your code to directly access and interact with an individual form
field without iterating through all fields on the page.
Available: Client
Function Signature
getField(fieldID) : FormField;
| Parameter | Type | Description |
|---|
fieldID | string | The field ID on the page |
Return value: A FormField
object representing the requested field ID on this page.
Examples: getField()
getParent()
The getParent()
is a function on the
FormPage
object
that returns the parent Form
object that this page belongs to. Every form page exists
as a page (or tab) inside a larger form. getParent()
lets you access the whole form from the context of a single page.
Available: Client
Return value: A Form
object for the parent form of the current
FormPage
.
Examples: getParent()
getTabType()
The getTabType()
is a function on the
FormPage
object
that returns the type of the tab or page within the form.
The page types that can be returned are as follows, and they will be represented by a character. For example, the page type Action will return A.
| Page Type | Return Value |
|---|
| Action | A |
| Form | F |
| Join | J |
| List | L |
| Grid | G |
Available: Client
Return value: A string representing the form page type.
Examples: getTabType()
refresh()
The refresh()
is a function on the
FormPage
object
that reloads or updates the form page with the latest data. Effectively, ensuring everything is up-to-date on the form page.
The optional parameter gives you control over how much of the form hierarchy gets refreshed, but you don't need to provide it if you only care about the current form page.
Available: Client
Function Signature
refresh([includeParents]) : void;
| Parameter | Type | Description |
|---|
includeParents | boolean | Optional: Refresh this form page and all parents in the hierarchy |
Return value : void, this function does not return a value back to the caller.
Examples: refresh()