Toggle menu

helper.getFieldValue(fieldName [,pageInstance])

Returns the value of the named field.

If you are getting the value of a field on a repeating page that has more than one instance saved to the current session, you must supply the page instance.

If you use this function on a repeating page, pageInstance will default to the current instance. 

Executed

Client-side and Server-side.

Arguments

ArgumentTypeDescription
fieldNameString, requiredName of the field to get the value of
pageInstanceInteger, optionalUsed with repeating pages.

The instance (zero-based) of the page the field is on that you'd like to get the value of. Defaults to the current page instance if called on the page that holds the field. If you call this function from elsewhere on your form and the page instance is not supplied, it will return an empty string

Returns

String.

Example

In this example the value of one field is fetched in a default function:

function (helper, defaultValue, currentValue) {
  var theValue = helper.getFieldValue('FIELD4');
  return theValue;
}

On a repeating page with more than one instance, the pageInstance must be supplied:

function (helper, defaultValue, currentValue) {
  var theValue = helper.getFieldValue('FIELD4', 1);
  return theValue;
}

Last modified on 1 April 2025