Skip to main content

getParent()

Last updated 13/01/2026

Definition

The

is a function on the

Form
object that returns another
Form
object, specifically, the parent of the current form if it exists.

Examples

The following functions demonstrate how you can use the

getParent()
function on the
Form
object.

Return the parent form

This code gets the

Form
object for the parent form of the current form.

JavaScript
Get the Form object for the parent form
function GetParentForm(form) {
return form.getParent();
}

Chaining the getParent() function

This code gets the

Form
object for the parent form stacked two above the current form.

JavaScript
Chaining the getParent() function
function GetFormTwoLevelsUp(form) {
return form.getParent().getParent();
}

Read a parent field value

This code reads a field's value on the parent form.

JavaScript
Read a parent field value
function GetParentFieldValue(form, fieldName) {
const parentForm = form.getParent();
if (!parentForm) return null;

return parentForm.getField(fieldName).getValue();
}