Form Field Events
Events fired by general input widgets (text, select, radio, checkbox, textarea).
All events on this page trigger FormHostProvider.runFormEvent.
note
widgetContext is transmitted as a JSON-encoded string on the wire. The values shown below are the deserialized structure.
onChange
Fired when a widget value changes.
Widgets: input, select, radio, checkbox, textarea
{
"pluginCode": "construct",
"formCode": "documents",
"guid": "550e8400-e29b-41d4-a716-446655440000",
"projectGuid": "38I9rEPw1BmxP75XcxgzD5WGOk1",
"pGuid": "38I9rEPw1BmxP75XcxgzD5WGOk1",
"formData": { "status": "active", "name": "Project Alpha" },
"widgetsState": null,
"widgetName": "status",
"widgetValue": "active",
"widgetEvent": "onChange",
"widgetContext": {
"referer": "/forms/documents/550e8400",
"parentWidgetId": null,
"hasParentForm": false,
"originator": null
}
}
onGetCustomResponse
Fired when Auto Complete is enabled in a TextArea widget's properties.
widgetValue contains the method name and the current input value. The backend should return a CustomResponse command with the matching items.
{
"pluginCode": "construct",
"formCode": "documents",
"guid": "550e8400-e29b-41d4-a716-446655440000",
"projectGuid": "38I9rEPw1BmxP75XcxgzD5WGOk1",
"pGuid": "38I9rEPw1BmxP75XcxgzD5WGOk1",
"formData": { "description": "Project Al" },
"widgetContext": null,
"widgetEvent": "onGetCustomResponse",
"widgetName": "description",
"widgetValue": {
"methodName": "getAutoCompleteItems",
"value": "Project Al"
}
}
note
widgetValue is transmitted as a JSON-encoded string on the wire.