Skip to main content

getParent()

Last updated 21/01/2026

Definition

The

is a function on the

FormPage
object that returns the parent
Form
object that this page belongs to.

Examples

The following functions demonstrate how you can use the

getParent()
function on the
FormPage
object.

Get the parent form from the current page

This code gets the current form page, retrieves the parent form that the page belongs to, and then logs the form's title to the Five Inspector.

JavaScript
Access parent form from the active page
const page = five.sender();
const form = page.getParent();

five.log("Parent form retrieved:", form.getTitle());

Access another page in the same form

This code accesses the current form page, retrieves its parent form, and then locates another page within the same form using its page ID. Once the target page is found, the code refreshes that page to reload its data and ensure it reflects the most up-to-date information.

JavaScript
Refresh a specific page from the current page
const page = five.sender();
const form = page.getParent();

// Get another page by its ID
const detailsPage = form.getPage("DetailsPage");
detailsPage.refresh();

Read a field from a different page

This code accesses the current form, navigates to another page within the same form, retrieves a specific field from that page, and logs the field's current value to the Five Inspector.

JavaScript
Retrieve the Status field value from the Summary page
const page = five.sender();
const form = page.getParent();

const summaryPage = form.getPage("Summary");
const statusField = summaryPage.getField("Status");

five.log("Status from Summary page:", statusField.getValue());

Refresh the entire form from one page

This code takes the current page you're on, finds the form it belongs to, and refreshes the entire form.

JavaScript
Refresh the entire form from the current page
const page = five.sender();
const form = page.getParent();

five.log("Refreshing entire form");
form.refresh()