getCaption()
Last updated 19/01/2026
Definition
The getCaption() is a function on the
FormPage
object
that returns the caption for the page.
Examples
Log the current page caption
This code gets the currently active form page and logs its caption to the Five Inspector.
Log the current page caption
const page = five.sender();
five.log("Current page:", page.getCaption());
Run logic only on a specific page
This code checks which form page is currently active, and if it's the Billing Details page, it runs some page-specific logic.
Run logic only on the Billing Details form page
const page = five.sender();
if (page.getCaption() === "Billing Details") {
five.log("Billing page logic executed");
}
Use the caption in messages
This code retrieves the currently active page and displays a message prompting the user to complete all required fields, dynamically including the page's caption in the message.
Prompt user to complete required fields on the current page
const page = five.sender();
five.showMessage("Please complete all required fields on the page: " + page.getCaption() + )