Toggle menu

helper.getPageValues([pageName][,pageInstance])

Returns all of the data for a particular page or page instance.

This function can be used on repeating and non-repeating pages.

Executed

Client-side and server-side.

Arguments

ArgumentTypeDescription
pageNameString, optionalThe name of the page to return data for. Defaults to the page the function is used on if not set
pageInstanceInteger, optionalThe page instance to return data for (zero-based), if not set will return all instances

Returns

The structure of the data returned will depend on whether or not the page repeats, and whether you asked for a particular instance or all instances.

Non-repeating Page

On a non-repeating page data is returned as a single object, where the keys are the field names:

{
    "NAME": "Tim",
    "AGE": "41"
}

Repeating Page, Single Instance

If you ask for a specific instance of a repeating page, the data is returned as a single object, in exactly the same format as a single non-repeating page.

Repeating Page, All Instances

If you don't set a page instance for a repeating page, the function returns an array of objects - one for each page.

This example shows a blank instance of the page was submitted:

[{
    "NAME": "Tim",
    "AGE": "41"
}, {
    "NAME": "Leo",
    "AGE": "40"
}, {
    "NAME": "",
    "AGE": ""
}]

Last modified on September 13, 2023

Share this page

Facebook icon Twitter icon email icon

Print

print icon