getTitle()
Last updated 21/01/2026
Definition
The getTitle() is a function on the
Form
object that returns the
title of the form as a string.
Examples
The following functions demonstrate how you can use the
getTitle()
function on the Form
object.
Log the form title
This code logs the form title to the Five Inspector.
Log the form title to the Five Inspector
const form = five.sender();
const title = form.getTitle();
five.log("Form title is:", title);
Show the form title in a message
This code shows the title of the form in a dialog box in the UI.
Show the form title in the UI
const form = five.sender();
five.showMessage("You are working on the form:" ${form.getTitle()});
Conditional logic based on the form title
This code checks which form the user is interacting with. If the form is titled Purchase Order, it shows a message indicating that special rules apply, otherwise, shows a generic message for other forms.
Show form-specific message
const form = five.sender();
if (form.getTitle() === "Purchase Order") {
five.showMessage("This is the Purchase Order form, special rules apply")
} else {
five.showMessage("This is a regular form");
}