Returns the names of all fields on a named, or all pages, of a form.
The long and short names of fields are returned in separate arrays. If a form doesn't have an external type, the field names in each array will be the same. See Field Names and External Types for an explanation of long and short names.
Executed
Client-side and server-side.
Arguments
Argument | Type | Description |
---|---|---|
pageName | String, optional | Only return the fields on the named page |
Returns
An array of objects, each representing a page of the form.
Property | Type | Description |
---|---|---|
pageName | String | The name of the page |
fieldsLong | Array | An array containing the full names of all fields on the form |
fieldsShort | Array | An array containing the names of the fields on the form minus any external type prefixes |
Example
This example shows a multipage form with an external type. Non-storing fields (layouts, browser-side "display" fields etc) do not need to be present in the external type definition, so only have a short name, although they are listed in the
[{
"pageName": "PAGE1",
"fieldsLong": ["GUIDANCETEXT", "LAYOUT1", "FORM_TIMSFORM.FIRSTNAME", "FORM_TIMSFORM.FAMILYNAME", "FORM_TIMSFORM.ADDRESS", "FORM_TIMSFORM.LOCATION", "HTMLFIELD", "BUTTON"],
"fieldsShort": ["GUIDANCETEXT", "LAYOUT1", "FIRSTNAME", "FAMILYNAME", "ADDRESS", "LOCATION", "HTMLFIELD", "BUTTON"]
}, {
"pageName": "PAGE2",
"fieldsLong": ["LAYOUT2", "FORM_TIMSFORM.EMAIL"],
"fieldsShort": ["LAYOUT2", "EMAIL"]
}]