rbf_setFieldDisabled()

Warning: Support for using this method with external objects (such as those mapped to external tables, to OpenEdge Service objects, or through a HDP connection) is a beta feature. This method is supported in production systems, except for external objects.

Purpose

This function disables or enables an input field on the current page. It will have no effect if the field does not exist on the current page. For fields that allow values in multiple languages, use the options parameter to specify which language for which to disable/enable the input field. If the language code is invalid, or is not included in the tenant's supported languages, the field will not be disabled or enabled.

Note: According to the HTML specification, disabled fields do not send data back to server when HTML form is submitted. So if you wish disabled to send data (probably set by some client-side script) you can re-enable input field in page's onSubmit event handler.

Syntax

rbf_setFieldDisabled(fieldname, isDisabled, options)

Parameters

fieldName

The integration name of field

isDisabled

The boolean value for "disabled" field's property

options

A JSON object containing langCode, whose value is an array of two-letter ISO language codes, for example, {"langCode":["ar","he","fr"]}. The field will be disabled/enabled for those languages.

Note: This API is supported in portals as well.

Example

The following example returns the value with input field disabled.

rbf_setFieldDisabled("empId",true,{"langCode":["ar","he","fr"]} )