Toggle menu

helper.getFieldID(fieldName)

Returns the ID in the DOM of the HTML element that contains the data for the specified field.

Executed

Client-side only

Arguments

ArgumentTypeDescription
fieldNameString, requiredThe name of the field 

Note that care needs to be taken when using getFieldID when working with buttons. In these circumstances your button's field name must not match one of the form action names (BACK, PREV, NEXT, FINISH etc) as those actions are themselves registered in the HTML DOM and will be returned instead of the ID of the field.

Returns

String. This is typically FIELDID_FIELDNAME

Example

function(helper, defaultValue, currentValue) {
    var theID = helper.getFieldID('GETMYID');
    return theID;
}

Last modified on 13 September 2023

Share this page

Facebook icon Twitter icon email icon

Print

print icon