LinkedIn
Copied!

Text area control in DX API

The Text area control (pxTextArea) helps your users enter long-form information comfortably in large text boxes. Learn about the JSON structure and elements of a sample Text area control, to understand how you can integrate it into your custom application.

The following JSON code is a sample API response for the Text area control:

{
    "validationMessages": "Invalid value specified for test. Value doesn't adhere to the Validate: ValidEmailAddress",
    "visible": true,
    "labelReserveSpace": true,
    "readOnly": true,
    "control": {
         "modes": [
                {
                    "modeType": "editable",
                    "controlFormat": "Standard",
                    "textAlign": "Left",
                    "tooltip": "Text Area Tooltip Localized",
                    "maxChars": "",
                    "formatType": "text",
                    "specifySize": "auto",
                    "obfuscated": false,
                    "minChars": ""
                },
                {
                    "modeType": "readOnly",
                    "autoPrepend": "",
                    "tooltip": "",
                    "showReadOnlyValidation": "false",
                    "autoAppend": "",
                    "formatType": "text",
                    "obfuscated": false
                }
            ],
        "actionSets": [
            {
                "actions": [
                    {
                        "action": "refresh",
                        "refreshFor": "VGVzdA%3D%3D"
                    }
                ],
                "events": [
                    {
                        "event": "change"
                    }
                ]
            },
            {
                "actions": [
                    {
                        "action": "refresh",
                        "refreshFor": "VGVzdA%3D%3D"
                    },
                    {
                        "action": "postValue"
                    }
                ],
                "events": [
                    {
                        "event": "focus"
                    },
                    {
                        "event": "click"
                    }
                ]
            }
        ],
        "type": "pxTextArea"
    },
    "label": "test",
    "type": "Text",
    "required": false,
    "validateAs": "ValidEmailAddress",
    "reference": "test",
    "labelFormat": "Standard",
    "disabled": false,
    "testID": "202007070327440734311",
    "value": ""Navateja"",
    "maxLength": 256,
    "expectedLength": "30",
    "fieldID": "Test",
    "customAttributes": {
        "testAttr": "testVal"
    }
}

The following examples show a sample configuration of the control with the relevant JSON elements:

Cell properties - General tab
Cell properties - General tab
  • When rules that are part of conditions, such as Visibility or Disable, return boolean values.
  • Fields, such as Helper text or Default value, return the corresponding value from the associated Pega rules.
  • For conditions, such as Visibility or Disable, only the Always and Condition (when rule) options are supported.
  • For conditions, such as Visibility or Disable, for the Condition (when rule) option, negation with the logical operator (!) is supported. For example, !pzVisibleWhen.
DX API attributes
DX API attributes
The response returns the name-value pairs that you add to the DX API attributes of the control as part of the customAttributes element.
Property referenced in the control - General tab
Property referenced in the control - General tab
Property referenced in the control - Advanced tab
Property referenced in the control - Advanced tab
The message in the validationMessages element is displayed when the validation in the validateAs element fails.
Cell properties - Presentation tab
Cell properties - Presentation tab
  • The response returns the value of the Edit options field as a boolean readOnly element. The read-only value is part of the value key in the JSON response.
  • Regardless of the setting in the Specify Width field, the response always returns the following line: control.modes[0].specifySize: auto.
Cell properties - Presentation tab, continued
Cell properties - Presentation tab, continued
Suggest Edit
Did you find this content helpful?

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.