Download OpenAPI specification:Download
The request is sent to the corezoid process before the page is loaded. The corezoid process decides whether to display the requested page or to redirect the user to another page. Optionally, data for dynamic injection into the page body can be sent in the response.
| timeout | number Default: 30 |
Array of objects The list of request results |
{- "timeout": 30,
- "ops": [
- {
- "conv_id": "{{CONV_ID}}",
- "company_id": "{{COMPANY_ID}}",
- "type": "create",
- "obj": "task",
- "data": {
- "body": {
- "page": "index",
- "context": {
- "actorId": "111",
- "rootActorId": "123",
- "appId": "124",
- "timeZoneOffset": -120
}, - "query": { }
}, - "path": "/get",
- "sessionData": {
- "userInfo": {
- "id": "12",
- "nick": "John Doe",
- "login": "john.doe@corezod.com"
}
}
}
}
]
}{- "code": 200,
- "data": {
- "viewModel": {
- "key": "value"
}, - "language": "language"
}
}The request is sent to the Corezoid process when a button is clicked or when interacting with a component which submitOnChange property is set to true. The request's body contains all information about the component that initiated the request and the values of all fields in the current form. The Corezoid process makes decisions regarding changes on the existing page, displaying notifications, or redirecting the user to another page.
| timeout | number Default: 30 |
Array of objects The list of request results |
{- "timeout": 30,
- "ops": [
- {
- "conv_id": "{{CONV_ID}}",
- "company_id": "{{COMPANY_ID}}",
- "type": "create",
- "obj": "task",
- "data": {
- "body": {
- "page": "index",
- "query": { },
- "context": {
- "actorId": "111",
- "rootActorId": "123",
- "appId": "124",
- "timeZoneOffset": -120
}, - "formId": "logIn",
- "sectionId": "credentials",
- "buttonId": "submit",
- "buttonData": {
- "action": "submitOnScroll",
- "length": 10
}, - "data": {
- "login": "admin",
- "password": "qwerty"
}
}, - "path": "/send",
- "sessionData": {
- "userInfo": {
- "id": "12",
- "nick": "John Doe",
- "login": "john.doe@corezod.com"
}
}
}
}
]
}{- "code": 200,
- "data": {
- "changes": [
- {
- "id": "componentId",
- "visibility": "hidden",
- "skipSubmitOnChange": false
}
]
}
}Array of objects (Form) | |
object | |
Array of objects (notification) | |
| query | object Query string parameters |
| styleClass | string css class that is defined in script style files |
{- "forms": [
- {
- "id": "string",
- "title": "string",
- "styleClass": "my-custom-class",
- "visibility": "visible",
- "grid": {
- "type": "one_column",
- "components": { },
- "styleClass": "my-custom-class"
}, - "sections": [
- {
- "id": "string",
- "type": "body",
- "visibility": "visible",
- "styleClass": "my-custom-class",
- "header": [
- {
- "id": "component-1",
- "visibility": "visible",
- "row": "",
- "w": "100",
- "styleClass": "my-custom-class",
- "class": "label",
- "tooltip": "tooltip text",
- "value": "Lorem ipsulum",
- "align": "left"
}
], - "modalHeader": [
- { }
], - "modalSize": "small",
- "contentLoop": [
- {
- "key": "value"
}
], - "content": [
- { }
]
}
]
}
], - "grid": {
- "type": "one_column",
- "components": { },
- "header": {
- "class": "string"
}, - "sideBar": {
- "components": {
- "center": [
- "id1"
], - "footer": [
- "id1"
], - "header": [
- "id1"
]
}, - "styleClass": "my-custom-class"
}
}, - "notifications": [
- {
- "type": "success",
- "title": "Error",
- "helperText": "api timeout",
- "expire": "auto"
}
], - "query": {
- "key": "value"
}, - "styleClass": "my-custom-class"
}| id | string |
| title | string |
| styleClass | string css class that is defined in script style files |
| visibility | string Enum: "visible" "hidden" "disabled" Component visibility :
|
object (grid) | |
Array of objects (Container for grouping the components) |
{- "id": "string",
- "title": "string",
- "styleClass": "my-custom-class",
- "visibility": "visible",
- "grid": {
- "type": "one_column",
- "components": { },
- "styleClass": "my-custom-class"
}, - "sections": [
- {
- "id": "string",
- "type": "body",
- "visibility": "visible",
- "styleClass": "my-custom-class",
- "header": [
- {
- "id": "component-1",
- "visibility": "visible",
- "row": "",
- "w": "100",
- "styleClass": "my-custom-class",
- "class": "label",
- "tooltip": "tooltip text",
- "value": "Lorem ipsulum",
- "align": "left"
}
], - "modalHeader": [
- { }
], - "modalSize": "small",
- "contentLoop": [
- {
- "key": "value"
}
], - "content": [
- { }
]
}
]
}| id required | string Identifier of the component (must be unique within the scope of the form) |
| visibility | string Default: "visible" Enum: "visible" "hidden" "disabled" Component visibility :
|
| row | string Row number. Components with the same row number will be aligned in one row |
| w | string Relative width of the component in the row (%). If not specified, the width will be the same for all components in the row |
| styleClass | string css class that is defined in script style files |
| value | boolean Value of the component |
| required | boolean Default: false Enum: true false If set to true, this will impact the visibility of the submit button on this form. “Labels” allows the user to display information to other users. |
| error | boolean Default: false Enum: true false Error flag |
| errorMsg | string Error message. Will be visible when component's 'error' flag is set to true |
| helpMsg | string Help message. Will be visible when component's 'error' flag is set to false |
| submitOnChange | boolean Default: false Enum: true false if true, changes of the element's value will trigger /send request. |
| class required | string Value: "check" Class of the component |
| title | string Title text |
{- "id": "component-1",
- "visibility": "visible",
- "row": "",
- "w": "100",
- "styleClass": "my-custom-class",
- "value": true,
- "required": false,
- "error": false,
- "errorMsg": "This field contains an error",
- "helpMsg": "This information is needed to make our product better",
- "submitOnChange": false,
- "class": "check",
- "title": "Element title"
}| id required | string Identifier of the component (must be unique within the scope of the form) |
| visibility | string Default: "visible" Enum: "visible" "hidden" "disabled" Component visibility :
|
| row | string Row number. Components with the same row number will be aligned in one row |
| w | string Relative width of the component in the row (%). If not specified, the width will be the same for all components in the row |
| styleClass | string css class that is defined in script style files |
| value | boolean Default: false Value of the component |
| required | boolean Default: false Enum: true false If set to true, this will impact the visibility of the submit button on this form. “Labels” allows the user to display information to other users. |
| error | boolean Default: false Enum: true false Error flag |
| errorMsg | string Error message. Will be visible when component's 'error' flag is set to true |
| helpMsg | string Help message. Will be visible when component's 'error' flag is set to false |
| submitOnChange | boolean Default: false Enum: true false if true, changes of the element's value will trigger /send request. |
| class required | string Value: "toggle" Class of the component |
| title | string Title text |
| align | string Enum: "left" "right" "center" Horizontal alignement |
object extra settings |
{- "id": "component-1",
- "visibility": "visible",
- "row": "",
- "w": "100",
- "styleClass": "my-custom-class",
- "value": false,
- "required": false,
- "error": false,
- "errorMsg": "This field contains an error",
- "helpMsg": "This information is needed to make our product better",
- "submitOnChange": false,
- "class": "toggle",
- "title": "Element title",
- "align": "left",
- "extra": {
- "size": "medium"
}
}| id required | string Identifier of the component (must be unique within the scope of the form) |
| visibility | string Default: "visible" Enum: "visible" "hidden" "disabled" Component visibility :
|
| row | string Row number. Components with the same row number will be aligned in one row |
| w | string Relative width of the component in the row (%). If not specified, the width will be the same for all components in the row |
| styleClass | string css class that is defined in script style files |
| class required | string Value: "slider" Class of the component |
| value | string Value of the slider |
| type | string Default: "default" Enum: "default" "skillBar" Type of the slider |
| title | string Title text |
| submitOnChange | boolean Default: false Enum: true false if true, changes of the element's value will trigger /send request. |
object extra settings |
{- "id": "component-1",
- "visibility": "visible",
- "row": "",
- "w": "100",
- "styleClass": "my-custom-class",
- "class": "slider",
- "value": "0",
- "type": "default",
- "title": "Element title",
- "submitOnChange": false,
- "extra": {
- "min": 0,
- "max": 100,
- "step": 1,
- "measure": "USD",
- "dots": false
}
}| id required | string Identifier of the component (must be unique within the scope of the form) |
| visibility | string Default: "visible" Enum: "visible" "hidden" "disabled" Component visibility :
|
| row | string Row number. Components with the same row number will be aligned in one row |
| w | string Relative width of the component in the row (%). If not specified, the width will be the same for all components in the row |
| styleClass | string css class that is defined in script style files |
| class required | string Value: "label" Class of the component |
| tooltip | string Tooltip displays informative text when users hover over an element. |
| value | string String with bbcode |
| align | string Enum: "left" "right" "center" Horizontal alignement |
{- "id": "component-1",
- "visibility": "visible",
- "row": "",
- "w": "100",
- "styleClass": "my-custom-class",
- "class": "label",
- "tooltip": "tooltip text",
- "value": "Lorem ipsulum",
- "align": "left"
}| id required | string Identifier of the component (must be unique within the scope of the form) |
| visibility | string Default: "visible" Enum: "visible" "hidden" "disabled" Component visibility :
|
| row | string Row number. Components with the same row number will be aligned in one row |
| w | string Relative width of the component in the row (%). If not specified, the width will be the same for all components in the row |
| styleClass | string css class that is defined in script style files |
| class required | string Value: "divider" Class of the component |
{- "id": "component-1",
- "visibility": "visible",
- "row": "",
- "w": "100",
- "styleClass": "my-custom-class",
- "class": "divider"
}| id required | string Identifier of the component (must be unique within the scope of the form) |
| visibility | string Default: "visible" Enum: "visible" "hidden" "disabled" Component visibility :
|
| row | string Row number. Components with the same row number will be aligned in one row |
| w | string Relative width of the component in the row (%). If not specified, the width will be the same for all components in the row |
| styleClass | string css class that is defined in script style files |
| class required | string Value: "image" Class of the component |
| value required | string url, or base64 |
| align | string Enum: "left" "right" "center" Horizontal alignement |
required | object extra settings |
{- "id": "component-1",
- "visibility": "visible",
- "row": "",
- "w": "100",
- "styleClass": "my-custom-class",
- "class": "image",
- "align": "left",
- "extra": {
- "alt": "Logo"
}
}| id required | string Identifier of the component (must be unique within the scope of the form) |
| visibility | string Default: "visible" Enum: "visible" "hidden" "disabled" Component visibility :
|
| row | string Row number. Components with the same row number will be aligned in one row |
| w | string Relative width of the component in the row (%). If not specified, the width will be the same for all components in the row |
| styleClass | string css class that is defined in script style files |
| class required | string Value: "file" Class of the component |
required | object |
| align | string Enum: "left" "right" "center" Horizontal alignement |
object extra settings |
{- "id": "component-1",
- "visibility": "visible",
- "row": "",
- "w": "100",
- "styleClass": "my-custom-class",
- "class": "file",
- "value": {
- "fileName": "ADSEFEFJJ12314FGG",
- "type": "image/png",
- "size": "1024",
- "title": "Logo.svg"
}, - "align": "left",
- "extra": {
- "preview": false
}
}| id required | string Identifier of the component (must be unique within the scope of the form) |
| visibility | string Default: "visible" Enum: "visible" "hidden" "disabled" Component visibility :
|
| row | string Row number. Components with the same row number will be aligned in one row |
| w | string Relative width of the component in the row (%). If not specified, the width will be the same for all components in the row |
| styleClass | string css class that is defined in script style files |
| type | string Default: "default" Enum: "default" "preview" Visualization type :
|
| class required | string Value: "carousel" Class of the component |
| submitOnChange | boolean Default: false Enum: true false if true, changes of the element's value will trigger /send request. |
object (File object) | |
required | Array of objects |
{- "id": "component-1",
- "visibility": "visible",
- "row": "",
- "w": "100",
- "styleClass": "my-custom-class",
- "type": "default",
- "class": "carousel",
- "submitOnChange": false,
- "value": {
- "fileName": "ADSEFEFJJ12314FGG",
- "type": "image/png",
- "size": "1024",
- "title": "Logo.svg"
}, - "options": [
- {
- "title": "Element title",
- "value": {
- "fileName": "ADSEFEFJJ12314FGG",
- "type": "image/png",
- "size": "1024",
- "title": "Logo.svg"
}
}
]
}| id required | string Identifier of the component (must be unique within the scope of the form) |
| visibility | string Default: "visible" Enum: "visible" "hidden" "disabled" Component visibility :
|
| row | string Row number. Components with the same row number will be aligned in one row |
| w | string Relative width of the component in the row (%). If not specified, the width will be the same for all components in the row |
| styleClass | string css class that is defined in script style files |
| title | string This value is used as a title for the copy chip |
| class required | string Value: "copy" Class of the component |
| tooltip | string Tooltip displays informative text when users hover over an element. |
| value | string Value that will be copied to the clipboard |
| align | string Enum: "left" "right" "center" Horizontal alignement |
| submitOnClick | boolean Enum: true false if true, clicking the copy element will first submit form data to Corezoid, wait for response, then copy the current value to clipboard. If the server response updated the value, the new value will be copied. If false, copies current value immediately without server interaction. |
object extra settings |
{- "id": "component-1",
- "visibility": "visible",
- "row": "",
- "w": "100",
- "styleClass": "my-custom-class",
- "title": "ID",
- "class": "copy",
- "tooltip": "tooltip text",
- "value": "LoremIpsulum",
- "align": "left",
- "submitOnClick": false,
- "extra": {
- "notificationText": "Copied to clipboard"
}
}| id required | string Identifier of the component (must be unique within the scope of the form) |
| visibility | string Default: "visible" Enum: "visible" "hidden" "disabled" Component visibility :
|
| row | string Row number. Components with the same row number will be aligned in one row |
| w | string Relative width of the component in the row (%). If not specified, the width will be the same for all components in the row |
| styleClass | string css class that is defined in script style files |
object Value of the component | |
| required | boolean Default: false Enum: true false If set to true, this will impact the visibility of the submit button on this form. “Labels” allows the user to display information to other users. |
| error | boolean Default: false Enum: true false Error flag |
| errorMsg | string Error message. Will be visible when component's 'error' flag is set to true |
| helpMsg | string Help message. Will be visible when component's 'error' flag is set to false |
| submitOnChange | boolean Default: false Enum: true false if true, changes of the element's value will trigger /send request. |
| class required | string Value: "upload" Class of the component |
| title | string Title text |
| align | string Enum: "left" "right" "center" Horizontal alignement |
| type | string Default: "default" Enum: "default" "webcam" Component type :
|
required | object extra settings |
{- "id": "component-1",
- "visibility": "visible",
- "row": "",
- "w": "100",
- "styleClass": "my-custom-class",
- "value": {
- "id": 34,
- "fileName": "ADSEFEFJJ12314FGG",
- "type": "application/pdf",
- "size": "1024",
- "title": "File.pdf"
}, - "required": false,
- "error": false,
- "errorMsg": "This field contains an error",
- "helpMsg": "This information is needed to make our product better",
- "submitOnChange": false,
- "class": "upload",
- "title": "Element title",
- "align": "left",
- "type": "default",
- "extra": {
- "accept": "image/png,application/pdf",
- "minSize": "10",
- "maxSize": "1024",
- "errorMsgInvalidFileType": "Invalid file type",
- "errorMsgMinImageSize": "File is to small",
- "errorMsgMaxImageSize": "File is to large",
- "api": {
- "auth": "Bearer eyJ1c2VySWQiOjEsIn"
}, - "screenshotFormat": "image/png",
- "videoConstraints": {
- "width": 1280,
- "height": 720,
- "facingMode": "user"
}, - "mirrored": false
}
}| id required | string Identifier of the component (must be unique within the scope of the form) |
| visibility | string Default: "visible" Enum: "visible" "hidden" "disabled" Component visibility :
|
| row | string Row number. Components with the same row number will be aligned in one row |
| w | string Relative width of the component in the row (%). If not specified, the width will be the same for all components in the row |
| styleClass | string css class that is defined in script style files |
| value | any Value of the component |
| required | boolean Default: false Enum: true false If set to true, this will impact the visibility of the submit button on this form. “Labels” allows the user to display information to other users. |
| error | boolean Default: false Enum: true false Error flag |
| errorMsg | string Error message. Will be visible when component's 'error' flag is set to true |
| helpMsg | string Help message. Will be visible when component's 'error' flag is set to false |
| submitOnChange | boolean Default: false Enum: true false if true, changes of the element's value will trigger /send request. |
| class required | string Value: "attachment" Class of the component |
required | object extra settings |
{- "id": "component-1",
- "visibility": "visible",
- "row": "",
- "w": "100",
- "styleClass": "my-custom-class",
- "value": null,
- "required": false,
- "error": false,
- "errorMsg": "This field contains an error",
- "helpMsg": "This information is needed to make our product better",
- "submitOnChange": false,
- "class": "attachment",
- "extra": {
- "multiple": true,
- "label": "Drop files to attach, or",
- "browseLinkLabel": "browse",
- "accept": "image/png,application/pdf",
- "maxFileSize": "1024",
- "api": {
- "auth": "Bearer eyJ1c2VySWQiOjEsIn"
}
}
}iframe.
In default mode, the widget is an iframe that loads any URL you provide. It can be a plain HTML page (for example, a help panel or a static dashboard) or a fully interactive mini-app (for example, a calendar picker, a custom search UI, a signature pad, or a file uploader).
If your iframe content is static, it can live completely independently. But if you want it to behave like a real form control inside a script, it needs a way to exchange data with the host page.
Scripts can define both configuration and state for the widget:
extra.config and can contain any settings you need (theme, feature flags, API endpoints, allowed file types, etc.).value: it is part of the current form, can be submitted to the backend, and can be updated by the backend via changes.To support these scenarios across domains, the parent page implements a small postMessage interface. The widget can request its current value/config (and even the full form data), and can send commands back (update value, upload files, resize, toggle loading, show notifications). You can implement the widget side with plain JavaScript — no knowledge of internal implementation details is required.
Communication uses the postMessage interface. The parent script Widget component listens and responds only to its iframe events.
const APP_NAME = 'scPostMessage';
// Inside widget iframe
window.addEventListener('message', (event) => {
const { data } = event;
if (!data || data.appName !== APP_NAME) return;
const { type, payload, result, error } = data;
// Your events handling here
});
// Send new value from widget
window.parent.postMessage(
{
appName: APP_NAME,
type: 'UPDATE_VALUE',
payload: { value: 'new value' },
},
'*'
);
Your widget is allowed to send a message to the parent window with appName = scPostMessage, type (see below), and (optionally) payload object.
If the event expects any request parameter, it should be placed inside the payload object. If the event expects a response, the parent sends back another message that contains the original request fields and adds result on success or error = true on failure.
It is a good practice to add a correlation field to every request (for example requestId, timestamp, or ref) so the widget can reliably match async responses to the corresponding request. The parent echoes request fields back in the response.
// Request (widget → parent)
{
appName: 'scPostMessage',
timestamp: Date.now(), // optional
type: 'REQUEST_VALUE',
payload: { /* request parameters (optional) */ }
}
// Response (parent → widget)
{
appName: 'scPostMessage',
timestamp: 1710000000000,
type: 'REQUEST_VALUE',
/* ...original request fields... */
result: '...', // on success
// error: true // on error
}
| Type | Payload keys | Effect |
|---|---|---|
| UPDATE_VALUE | value (required, any) |
Sets the widget form value to payload.value. This value becomes part of the current form and will be sent to the backend on submit (and may be submitted immediately if the widget is configured with submitOnChange). Use this event to send a clean value (see Legacy behavior). |
| REQUEST_VALUE | – | Parent replies with current value in result. |
| REQUEST_CONFIG | – | Parent replies with current config (extra.config). |
| REQUEST_FORM_DATA | – | Parent replies with full form data object. |
| UPLOAD_FILES | files (required, array of File)api (object, { uploadUrl, downloadUrl, auth })compressionLevel (optional) |
Uploads files via the host script; reply returns uploaded file descriptors in result or error. The descriptor format matches the Upload component value (see Upload). |
| RESIZE_WIDGET | widthheight |
By default, the host script controls iframe sizing. Send this event to ask the parent script to resize the iframe to the specified dimensions (for example, to fit your widget content). Numbers are treated as pixels. |
| SET_LOADING | isLoading (required, boolean) |
Toggles widget loading overlay in the parent script UI. |
| SEND_NOTIFICATION | titleidhelperTextexpiretype |
Shows a generic notification using the parent script notification system. |
| SEND_CUSTOM_EVENT | any | Sends a custom event to the host. The host forwards it to Corezoid as a form submit action with buttonId equal to the widget id and buttonData containing the event object. This event does not change the widget value. |
| Any other type (custom event) | any | If the iframe sends a message with an unknown type, the host treats it as a custom event. By default, the host forwards it to Corezoid as a form submit action with buttonId equal to the widget id and buttonData containing the event object, and it does not change the widget value. If extra.allowedEvents is set, only listed custom types are accepted; others are ignored. If extra.legacyEventsHandling is true, custom events are treated as widget value updates (legacy). |
Legacy behavior: Some older widgets send messages without a type. In this case, the host treats the whole message as a value update and stores the entire event object as the widget value. For custom events (unknown type values), you can enable the same legacy “value update” behavior by setting extra.legacyEventsHandling to true; otherwise custom events are forwarded as submit actions (the same way as SEND_CUSTOM_EVENT does) and do not change the widget value.
On widget load the parent sends UPDATE_VALUE and UPDATE_CONFIG if value or extra.config are set in the widget JSON. Later script/backend updates arrive the same way.
| Type | Keys |
When sent |
|---|---|---|
| UPDATE_VALUE | value(any) |
On iframe load (if set) and when value changes in script/backend. |
| UPDATE_CONFIG | config(any) |
On iframe load (if extra.config set) and when config changes. |
| Some of Widget → Parent events | result(any)error(boolean) |
For some request-type events, the parent sends a separate response message that echoes the request fields and adds result on success or error = true on failure. |
| id required | string Identifier of the component (must be unique within the scope of the form) |
| visibility | string Default: "visible" Enum: "visible" "hidden" "disabled" Component visibility :
|
| row | string Row number. Components with the same row number will be aligned in one row |
| w | string Relative width of the component in the row (%). If not specified, the width will be the same for all components in the row |
| styleClass | string css class that is defined in script style files |
| value | any Widget value (part of the current form state). The format is defined by your widget implementation. |
| class required | string Value: "widget" Class of the component |
| type | string Default: "default" default default twilio onfido webComments amazonConnect |
| submitOnChange | boolean Enum: true false if true, changes of the element's value will trigger /send request. |
required | object extra settings |
{- "id": "component-1",
- "visibility": "visible",
- "row": "",
- "w": "100",
- "styleClass": "my-custom-class",
- "value": null,
- "class": "widget",
- "type": "default",
- "submitOnChange": false,
- "extra": {
- "allowFullScreen": false,
- "allow": "camera; microphone",
- "config": {
- "theme": "light",
- "features": {
- "enableSearch": true,
- "enableUpload": true
}
}, - "allowedEvents": [
- "MY_CUSTOM_EVENT",
- "OPEN_HELP"
], - "legacyEventsHandling": false
}
}Edit is an input field used in forms and dialogs.
It allows users to enter and edit text, supports multiple formats: text, numbers, email, password, multiline text, date, and color picker.
Free-form text input.
Integer-only input (non-digit characters are ignored). The value is stored as a number.
Floating-point number input.
Phone number input.
Email input. Validates the email format.
Password input (characters are hidden).
Multi-line text area. Configure the number of visible rows using extra.lineNumbers.
Color picker input. Uses a popover selector UI.
Date (or date range) input. Uses a calendar popover selector UI.
| id required | string Identifier of the component (must be unique within the scope of the form) |
| visibility | string Default: "visible" Enum: "visible" "hidden" "disabled" Component visibility :
|
| row | string Row number. Components with the same row number will be aligned in one row |
| w | string Relative width of the component in the row (%). If not specified, the width will be the same for all components in the row |
| styleClass | string css class that is defined in script style files |
| type | string Default: "text" Field type. text text int float phone email password multiline date colorPicker |
| required | boolean Enum: true false If set to true, this will impact the visibility of the submit button on this form. “Labels” allows the user to display information to other users. |
| error | boolean Enum: true false Error flag |
| errorMsg | string Error message. Will be visible when component's 'error' flag is set to true |
| helpMsg | string Help message. Will be visible when component's 'error' flag is set to false |
| submitOnChange | boolean Enum: true false if true, changes of the element's value will trigger /send request. |
| submitOnEnter | boolean Default: false If true, the Enter key will submit the form (single-line fields only). |
| class required | string Value: "edit" Class of the component |
| title | string Title text |
| tooltip | string Tooltip text shown near the title as an info icon and appears on hover. |
| autoFocus | boolean Default: false |
| placeholder | string |
| resettable | boolean Default: false If true, a reset (clear) button will be displayed. Default is |
object Additional settings for Use these options to control how the placeholder looks and behaves. | |
| mask | string Use Value format:
Pattern rules:
Examples:
|
| value | string Value of the component |
| regexp | string Validation rule (regular expression). If provided, it becomes the primary validation rule for the field and overrides built-in validation (including email format validation). |
object extra settings |
{- "id": "component-1",
- "visibility": "visible",
- "row": "",
- "w": "100",
- "styleClass": "my-custom-class",
- "type": "text",
- "required": true,
- "error": true,
- "errorMsg": "string",
- "helpMsg": "string",
- "submitOnChange": true,
- "submitOnEnter": false,
- "class": "edit",
- "title": "Element title",
- "tooltip": "tooltip text",
- "autoFocus": false,
- "placeholder": "Enter your name",
- "resettable": false,
- "maskOptions": {
- "placeholderChar": "_",
- "lazy": true
}, - "mask": "+{38}(000)000-00-00",
- "value": "string",
- "regexp": "^[A-Za-z0-9_\\\\-]+$",
- "extra": {
- "length": 50,
- "removeWhitespace": false
}
}| id required | string Identifier of the component (must be unique within the scope of the form) |
| visibility | string Default: "visible" Enum: "visible" "hidden" "disabled" Component visibility :
|
| row | string Row number. Components with the same row number will be aligned in one row |
| w | string Relative width of the component in the row (%). If not specified, the width will be the same for all components in the row |
| styleClass | string css class that is defined in script style files |
| value | string Value of the component |
| required | boolean Default: false Enum: true false If set to true, this will impact the visibility of the submit button on this form. “Labels” allows the user to display information to other users. |
| error | boolean Default: false Enum: true false Error flag |
| errorMsg | string Error message. Will be visible when component's 'error' flag is set to true |
| helpMsg | string Help message. Will be visible when component's 'error' flag is set to false |
| submitOnChange | boolean Default: false Enum: true false if true, changes of the element's value will trigger /send request. |
| class required | string Value: "select" Class of the component |
| type | string (Type of the select component) Default: "default" default default autocomplete |
| title | string Title text |
| tooltip | string Tooltip displays informative text when users hover over an element. |
| autoFocus | boolean Default: false |
| placeholder | string |
| resettable | boolean (If true, reset button will be displayed) Default: false |
| submitOnScroll | boolean (If true, /send request will be triggered on scroll) Default: false |
Array of objects |
{- "id": "component-1",
- "visibility": "visible",
- "row": "",
- "w": "100",
- "styleClass": "my-custom-class",
- "value": "option-id",
- "required": false,
- "error": false,
- "errorMsg": "This field contains an error",
- "helpMsg": "This information is needed to make our product better",
- "submitOnChange": false,
- "class": "select",
- "type": "default",
- "title": "Element title",
- "tooltip": "tooltip text",
- "autoFocus": false,
- "placeholder": "Select your favorite number",
- "resettable": false,
- "submitOnScroll": false,
- "options": [
- {
- "title": "Option title",
- "value": "option-id",
- "visibility": "visible",
- "icon": "gear",
- "tooltip": "Option tooltip",
- "badge": 5,
- "styleClass": "custom-option"
}
]
}| id required | string Identifier of the component (must be unique within the scope of the form) |
| visibility | string Default: "visible" Enum: "visible" "hidden" "disabled" Component visibility :
|
| row | string Row number. Components with the same row number will be aligned in one row |
| w | string Relative width of the component in the row (%). If not specified, the width will be the same for all components in the row |
| styleClass | string css class that is defined in script style files |
Array of objects Value of the component | |
| required | boolean Default: false Enum: true false If set to true, this will impact the visibility of the submit button on this form. “Labels” allows the user to display information to other users. |
| error | boolean Default: false Enum: true false Error flag |
| errorMsg | string Error message. Will be visible when component's 'error' flag is set to true |
| helpMsg | string Help message. Will be visible when component's 'error' flag is set to false |
| submitOnChange | boolean Default: false Enum: true false if true, changes of the element's value will trigger /send request. |
| class required | string Value: "multiselect" Class of the component |
| title | string Title text |
| placeholder | string |
| autoFocus | boolean Default: false |
Array of objects | |
object extra settings |
{- "id": "component-1",
- "visibility": "visible",
- "row": "",
- "w": "100",
- "styleClass": "my-custom-class",
- "value": [
- {
- "value": "option-1",
- "title": "option one"
}
], - "required": false,
- "error": false,
- "errorMsg": "This field contains an error",
- "helpMsg": "This information is needed to make our product better",
- "submitOnChange": false,
- "class": "multiselect",
- "title": "Element title",
- "placeholder": "Select your favorite numbers",
- "autoFocus": false,
- "options": [
- {
- "title": "Option title",
- "value": "option-id",
- "visibility": "visible",
- "tooltip": "tooltip text"
}
], - "extra": {
- "length": 2
}
}| id required | string Identifier of the component (must be unique within the scope of the form) |
| visibility | string Default: "visible" Enum: "visible" "hidden" "disabled" Component visibility :
|
| row | string Row number. Components with the same row number will be aligned in one row |
| w | string Relative width of the component in the row (%). If not specified, the width will be the same for all components in the row |
| styleClass | string css class that is defined in script style files |
| value | string Value of the component |
| required | boolean Default: false Enum: true false If set to true, this will impact the visibility of the submit button on this form. “Labels” allows the user to display information to other users. |
| error | boolean Default: false Enum: true false Error flag |
| errorMsg | string Error message. Will be visible when component's 'error' flag is set to true |
| helpMsg | string Help message. Will be visible when component's 'error' flag is set to false |
| submitOnChange | boolean Default: false Enum: true false if true, changes of the element's value will trigger /send request. |
| class required | string Value: "radio" Class of the component |
object extra settings | |
| title | string Title text |
| align | string (alignement) Default: "left" Enum: "left" "right" "center" |
Array of objects |
{- "id": "component-1",
- "visibility": "visible",
- "row": "",
- "w": "100",
- "styleClass": "my-custom-class",
- "value": "option-id",
- "required": false,
- "error": false,
- "errorMsg": "This field contains an error",
- "helpMsg": "This information is needed to make our product better",
- "submitOnChange": false,
- "class": "radio",
- "extra": {
- "direction": "column"
}, - "title": "Element title",
- "align": "left",
- "options": [
- {
- "title": "Option title",
- "value": "option-id",
- "visibility": "visible"
}
]
}| id required | string Identifier of the component (must be unique within the scope of the form) |
| visibility | string Default: "visible" Enum: "visible" "hidden" "disabled" Component visibility :
|
| row | string Row number. Components with the same row number will be aligned in one row |
| w | string Relative width of the component in the row (%). If not specified, the width will be the same for all components in the row |
| styleClass | string css class that is defined in script style files |
object Value of the component | |
| required | boolean Default: false Enum: true false If set to true, this will impact the visibility of the submit button on this form. “Labels” allows the user to display information to other users. |
| error | boolean Default: false Enum: true false Error flag |
| errorMsg | string Error message. Will be visible when component's 'error' flag is set to true |
| helpMsg | string Help message. Will be visible when component's 'error' flag is set to false |
| submitOnChange | boolean Default: false Enum: true false if true, changes of the element's value will trigger /send request. |
| class required | string Value: "phone" Class of the component |
| title | string Title text |
object | |
| regexp | string (Regular expression for validation of the countryCode+number) |
Array of objects | |
object extra settings |
{- "id": "component-1",
- "visibility": "visible",
- "row": "",
- "w": "100",
- "styleClass": "my-custom-class",
- "value": {
- "countryCode": "380",
- "number": "3567322"
}, - "required": false,
- "error": false,
- "errorMsg": "This field contains an error",
- "helpMsg": "This information is needed to make our product better",
- "submitOnChange": false,
- "class": "phone",
- "title": "Element title",
- "placeholder": {
- "countryCode": "380",
- "number": "3567322"
}, - "regexp": "^[0-9]{9,17}$",
- "options": [
- {
- "title": "+380",
- "value": "380"
}
], - "extra": {
- "placeholder": {
- "countryCode": "code",
- "number": "number"
}
}
}| id required | string Identifier of the component (must be unique within the scope of the form) |
| visibility | string Default: "visible" Enum: "visible" "hidden" "disabled" Component visibility :
|
| row | string Row number. Components with the same row number will be aligned in one row |
| w | string Relative width of the component in the row (%). If not specified, the width will be the same for all components in the row |
| styleClass | string css class that is defined in script style files |
| class required | string Value: "tab" Class of the component |
| value | string (Selected tab id) |
| align | string Enum: "left" "right" "center" Horizontal alignement |
Array of objects | |
| submitOnChange | boolean Enum: true false if true, changes of the element's value will trigger /send request. |
{- "id": "component-1",
- "visibility": "visible",
- "row": "",
- "w": "100",
- "styleClass": "my-custom-class",
- "class": "tab",
- "value": "first_tab",
- "align": "left",
- "options": [
- {
- "title": "First tab",
- "value": "first_tab",
- "error": false,
- "visibility": "visible",
- "styleClass": "my-custom-class"
}
], - "submitOnChange": false
}| id required | string Identifier of the component (must be unique within the scope of the form) |
| visibility | string Default: "visible" Enum: "visible" "hidden" "disabled" Component visibility :
|
| row | string Row number. Components with the same row number will be aligned in one row |
| w | string Relative width of the component in the row (%). If not specified, the width will be the same for all components in the row |
| styleClass | string css class that is defined in script style files |
| class required | string Value: "comments" Class of the component |
| placeholder | string (Placeholder text) |
Array of objects (message) |
{- "id": "component-1",
- "visibility": "visible",
- "row": "",
- "w": "100",
- "styleClass": "my-custom-class",
- "class": "comments",
- "placeholder": "There is no messages yet",
- "value": [
- {
- "date": "01.01.2021 14:01",
- "description": "description",
- "location": "location",
- "value": "Text 1",
- "user": {
- "name": "John Doe"
}
}
]
}| id required | string Identifier of the component (must be unique within the scope of the form) |
| visibility | string Default: "visible" Enum: "visible" "hidden" "disabled" Component visibility :
|
| row | string Row number. Components with the same row number will be aligned in one row |
| w | string Relative width of the component in the row (%). If not specified, the width will be the same for all components in the row |
| styleClass | string css class that is defined in script style files |
| class required | any Value: "table" |
| type | string Default: "default" The type of the table default default radio check group |
Array of objects | |
Array of objects (Table row) | |
| submitOnScroll | boolean (If true, /send request will be triggered on scroll) Default: false |
object extra settings |
{- "id": "component-1",
- "visibility": "visible",
- "row": "",
- "w": "100",
- "styleClass": "my-custom-class",
- "class": "table",
- "type": "default",
- "head": [
- {
- "value": "firstName",
- "title": "First name",
- "visibility": "visible",
- "styleClass": "my-custom-class",
- "isSticky": false
}
], - "body": [
- {
- "value": "firtsRow",
- "groupValue": "string",
- "styleClass": "my-custom-class",
- "clickable": true,
- "options": [
- {
- "value": "firstName",
- "title": "John",
- "button": {
- "title": "Edit",
- "tooltip": "Open details",
- "visibility": "visible",
- "extra": {
- "icon": "phone",
- "options": [
- {
- "title": "Option title",
- "value": "option-id",
- "visibility": "visible"
}
]
}
}, - "file": {
- "label": "John Doe",
- "fileName": "ADSEFEFJJ12314FGG",
- "type": "image/png",
- "size": "1024",
- "title": "Logo.svg"
}, - "check": {
- "value": false,
- "visibility": "visible",
- "error": false,
- "title": "Accept terms",
- "helpMsg": "Click to select",
- "errorMsg": "Selection required"
}, - "copy": {
- "value": "1234567890",
- "title": "Copy",
- "tooltip": "CopyTooltip",
- "visibility": "visible",
- "extra": {
- "notificationText": "Copied!"
}
}, - "styleClass": "my-custom-class"
}
]
}
], - "submitOnScroll": false,
- "extra": {
- "page": "1",
- "totalPages": "10",
- "rowsPerPage": "10",
- "rowsPerPageOptions": [
- "10",
- "20",
- "30"
], - "rowsPerPageTitle": "Row per page:",
- "rowsPerPageDescr": "1-10 of 100",
- "sort": {
- "value": "firstName",
- "order": "desc"
}
}
}| id required | string Identifier of the component (must be unique within the scope of the form) |
| visibility | string Default: "visible" Enum: "visible" "hidden" "disabled" Component visibility :
|
| row | string Row number. Components with the same row number will be aligned in one row |
| w | string Relative width of the component in the row (%). If not specified, the width will be the same for all components in the row |
| styleClass | string css class that is defined in script style files |
| class required | string Value: "stepper" Class of the component |
| type | string Default: "default" default default mobile |
| title | string Title text |
| value | string value of the component |
| align | string (alignement) Default: "left" Enum: "left" "right" "center" |
object extra settings | |
Array of objects |
{- "id": "component-1",
- "visibility": "visible",
- "row": "",
- "w": "100",
- "styleClass": "my-custom-class",
- "class": "stepper",
- "type": "default",
- "title": "Element title",
- "value": "option-id",
- "align": "left",
- "extra": {
- "mobileVisible": false
}, - "options": [
- {
- "title": "Option title",
- "value": "option-id",
- "visibility": "visible",
- "completed": false
}
]
}| id required | string Identifier of the component (must be unique within the scope of the form) |
| visibility | string Default: "visible" Enum: "visible" "hidden" "disabled" Component visibility :
|
| row | string Row number. Components with the same row number will be aligned in one row |
| w | string Relative width of the component in the row (%). If not specified, the width will be the same for all components in the row |
| styleClass | string css class that is defined in script style files |
object Value of the component | |
| required | boolean Default: false Enum: true false If set to true, this will impact the visibility of the submit button on this form. “Labels” allows the user to display information to other users. |
| error | boolean Default: false Enum: true false Error flag |
| errorMsg | string Error message. Will be visible when component's 'error' flag is set to true |
| helpMsg | string Help message. Will be visible when component's 'error' flag is set to false |
| submitOnChange | boolean Default: false Enum: true false if true, changes of the element's value will trigger /send request. |
| class required | string Value: "otp" Class of the component |
| type | string Default: "text" Enum: "text" "int" With "int" type sets the keyboard to numeric input mode on mobile devices. |
| title | string Title text |
| autoFocus | boolean Default: false |
object extra settings |
{- "id": "component-1",
- "visibility": "visible",
- "row": "",
- "w": "100",
- "styleClass": "my-custom-class",
- "value": {
- "otp-0": "0",
- "otp-1": "1",
- "otp-2": "2",
- "otp-3": "3"
}, - "required": false,
- "error": false,
- "errorMsg": "This field contains an error",
- "helpMsg": "This information is needed to make our product better",
- "submitOnChange": false,
- "class": "otp",
- "type": "text",
- "title": "Element title",
- "autoFocus": false,
- "extra": {
- "length": 4
}
}| id required | string Identifier of the component (must be unique within the scope of the form) |
| visibility | string Default: "visible" Enum: "visible" "hidden" "disabled" Component visibility :
|
| row | string Row number. Components with the same row number will be aligned in one row |
| w | string Relative width of the component in the row (%). If not specified, the width will be the same for all components in the row |
| styleClass | string css class that is defined in script style files |
| class required | string Value: "signature" Class of the component |
object Value of the component | |
| title | string Title text |
object extra settings | |
| required | boolean Default: false Enum: true false If set to true, this will impact the visibility of the submit button on this form. “Labels” allows the user to display information to other users. |
| error | boolean Default: false Enum: true false Error flag |
| errorMsg | string Error message. Will be visible when component's 'error' flag is set to true |
| helpMsg | string Help message. Will be visible when component's 'error' flag is set to false |
| submitOnChange | boolean Default: false Enum: true false if true, changes of the element's value will trigger /send request. |
{- "id": "component-1",
- "visibility": "visible",
- "row": "",
- "w": "100",
- "styleClass": "my-custom-class",
- "class": "signature",
- "value": null,
- "title": "Element title",
- "extra": {
- "strokeStyle": {
- "strokeColor": "#000000",
- "strokeWidth": 5,
- "lineCap": "round"
}, - "clearButtonTitle": "Clear",
- "saveButtonTitle": "Save"
}, - "required": false,
- "error": false,
- "errorMsg": "This field contains an error",
- "helpMsg": "This information is needed to make our product better",
- "submitOnChange": false
}The main menu renders a hierarchical navigation tree that can highlight the active path, display custom badges or icons, and submit actions back to the form when users select an item.
Inline branches expand directly in the list, while deeper levels open a contextual pop-up to keep navigation compact.
When embedding the main menu into a collapsible sidebar, you can enable extra.collapsed.
maxInlineDepth = 1).circle_filled icon is used in collapsed mode.collapsed CSS class is added to the root element so you can target this state.The component state lives in value. It always carries the current activeId and expandedIds array, which are sent to Corezoid as part of the form state on each update.
Every interaction with the main menu may trigger a /send request to Corezoid. The buttonId field contains the menu id, while buttonData describes the event:
{
"buttonId": "mainMenu",
"buttonData": {
"action": "select",
"id": "flows", // id of the clicked item
"path": ["operations", "automation", "flows"],
"meta": // optional meta payload provided in the item config
}
}
If submitOnBranchToggle is enabled, expanding/collapsing a branch sends:
{
"buttonId": "mainMenu",
"buttonData": {
"action": "expand" | "collapse",
"id": "automation",
"path": ["operations", "automation"], // full path to the branch
"meta": // optional meta payload provided in the item config
}
}
| id required | string Identifier of the component (must be unique within the scope of the form) |
| visibility | string Default: "visible" Enum: "visible" "hidden" "disabled" Component visibility :
|
| row | string Row number. Components with the same row number will be aligned in one row |
| w | string Relative width of the component in the row (%). If not specified, the width will be the same for all components in the row |
| styleClass | string css class that is defined in script style files |
| class required | string Value: "mainMenu" Class of the component |
required | Array of objects non-empty Flat list of menu nodes that can be reused across the hierarchy. |
required | object (Hierarchy definition) Mapping of parent IDs to arrays of their children. The special Example payload:
|
object Current state of the component that is stored in the form data and sent back to Corezoid with each update. | |
object extra settings |
{- "id": "component-1",
- "visibility": "visible",
- "row": "",
- "w": "100",
- "styleClass": "my-custom-class",
- "class": "mainMenu",
- "items": [
- {
- "id": "home",
- "title": "[b]Home[/b]",
- "visibility": "visible",
- "icon": "folder",
- "badge": "New",
- "styleClass": "menu-home",
- "meta": {
- "link": {
- "href": "/home"
}
}
}, - {
- "id": "users",
- "title": "Users"
}, - {
- "id": "reports",
- "title": "Reports"
}, - {
- "id": "profile",
- "title": "Profile"
}, - {
- "id": "settings",
- "title": "Settings"
}
], - "structure": {
- "$root": [
- "home",
- "users",
- "reports"
], - "users": [
- "profile",
- "settings"
]
}, - "value": {
- "activeId": "profile",
- "expandedIds": [
- "users"
]
}, - "extra": {
- "submitOnBranchToggle": false,
- "autoExpandActive": true,
- "maxInlineDepth": 2,
- "highlightActivePath": true,
- "showPopupTitle": true,
- "collapsed": false
}
}Injection of variable value into the page config: "Your personal discount is {{variableName}} %"
Example
{
"code":200,
"viewModel":{ "value": "10" }
}
+
{
"id":"label",
"value":"Your personal discount is {{value}} %"
}
=
{
"id":"label",
"value":"Your personal discount is 10 %"
}
Page localization is stored separately from the page configuration.
Example
/locale contains common keys for all pages.
/pages/index/locale contains keys for the index page only.
These two locale objects will be merged, and all matching keys in the index page config will be replaced with their values.
{
"code": 200,
"viewModel": { "localeKey": "[[sayHello]], [[sayGoodbye]]", "name": "world" },
"language": "en"
}
+
/pages/index/locale
{
"sayHello": "Hello {{name}}",
"sayGoodbye": {
"en": "goodbye!",
"uk": "до побачення!"
}
}
+
/pages/index/config
{
"id": "label",
"value": "[[localeKey]]"
}
=
{
"id": "label",
"value": "Hello world, goodbye!"
}
Forms, sections, and components defined in /definitions can be reused across pages.
"$ref" is a link to a definition file in /definitions folder. It helps you keep common UI fragments in one place and reuse them across multiple pages.
How it works:
/definitions."$ref": "#/path/to/definition".$ref.Notes:
$ref value must be a literal string (placeholders are not resolved inside $ref).$ref is kept as-is.$ref is removed.$ref define the same field, the definition value wins.id) into definitions unless you want them fixed everywhere.Example
Folder structure:
/definitions
info
test
next
The $ref path points to a file (or nested file path) under /definitions.
For nested folders, the path works the same way:
/definitions/common/buttons/next
is referenced as:
{ "$ref": "#/common/buttons/next" }
Form reference:
{
"id": "info_test",
"type": "body",
"$ref": "#/info"
}
Section reference:
{
"id": "info_test",
"type": "body",
"sections": [
{
"id": "common",
"$ref": "#/test"
}
]
}
Button reference:
{
"class": "button",
"$ref": "#/next"
}
contentLoop is a section-level mechanism for rendering repeatable UI content from a template.
It allows you to describe section.content once (as a template with placeholders), and then expand it into a final list of rendered items using an array of iteration objects (loop items).
CDU takes the section content template and repeats it once per object in contentLoop, replacing {{...}} placeholders with values from that object (and from viewModel/locale when needed). The rendered items from all iterations are appended into one final section.content array.
In the page config (script filesystem), inside a form section:
Option A: inline array
{
"id": "itemsSection",
"contentLoop": [
{ "index": "1", "title": "Item A", "amount": "10" },
{ "index": "2", "title": "Item B", "amount": "20" }
],
"content": [
{ "id": "row{{index}}_title", "class": "label", "value": "{{title}}" },
{ "id": "row{{index}}_amount", "class": "label", "value": "{{amount}}" }
]
}
Option B: resolve the loop array from the viewModel
viewModel:
{
"items": [
{ "index": "1", "title": "Item A", "amount": "10" },
{ "index": "2", "title": "Item B", "amount": "20" }
]
}
Section config:
{
"id": "itemsSection",
"contentLoop": "{{items}}",
"content": [
{ "id": "row{{index}}_title", "class": "label", "value": "{{title}}" },
{ "id": "row{{index}}_amount", "class": "label", "value": "{{amount}}" }
]
}
When CDU renders a page (initially or after updates), contentLoop must resolve to an array of objects.
CDU then renders the section template (section.content) once per loop item and concatenates the results linearly (seamlessly).
Simple example
Section template:
{
"id": "itemsSection",
"contentLoop": [
{ "index": "1", "title": "Item A", "amount": "10" },
{ "index": "2", "title": "Item B", "amount": "20" }
],
"content": [
{ "id": "row{{index}}_title", "class": "label", "value": "{{title}}" },
{ "id": "row{{index}}_amount", "class": "label", "value": "{{amount}}" }
]
}
Resulting section.content after expansion:
[
{ "id": "row1_title", "class": "label", "value": "Item A" },
{ "id": "row1_amount", "class": "label", "value": "10" },
{ "id": "row2_title", "class": "label", "value": "Item B" },
{ "id": "row2_amount", "class": "label", "value": "20" }
]
Notes:
class field cannot be changed dynamically (no injection is applied to it).$ref definitions are resolved using /definitions (best-effort).[[...]] placeholders are resolved using the locale.viewModel used for {{...}} placeholders is merged from multiple sources:viewModel (stored in the script filesystem),viewModel returned by Corezoid for full page render/reset (GET or 205 + viewModel),viewModel returned together with 200 + changes,Each object in contentLoop is a data row: its fields are used to fill {{...}} placeholders in the section template (content) for that iteration.
It is a good practice to include a stable unique key in each contentLoop item (for example index or rowId) and use it to build unique item ids in the rendered content.
An empty loop is valid and means "clear content":
{ "formId": "info", "id": "itemsSection", "contentLoop": [] }
There are two supported ways to update dynamic section content:
200 + changes with contentLoop (+ optional viewModel) (update one section content)Use this when you want to regenerate a single section without resetting the whole page.
Below is an example of a section template in the script config. Here {{options}} is not part of a contentLoop item, so it must come from viewModel (this is useful when a placeholder refers to a large shared value that is the same for all loop items):
{
"id": "itemsSection",
"content": [
{ "id": "row{{index}}_title", "class": "label", "value": "{{title}}" },
{
"id": "row{{index}}_select",
"class": "select",
"options": "{{options}}",
"value": "{{selectedOption}}"
}
]
}
In your Corezoid receiver process, return a change for the target section:
{
"code": 200,
"data": {
"viewModel": {
"options": [
/* shared select options; can be large */
]
},
"changes": [
{
"formId": "info",
"id": "itemsSection",
"contentLoop": [
{ "index": "1", "title": "Item A", "selectedOption": "1" },
{ "index": "2", "title": "Item B", "selectedOption": "2" }
]
}
]
}
}
viewModel is optional, but it may be needed when your section template references additional {{...}} placeholders that are not present in each contentLoop item (for example {{options}}, as shown in the section template example above).
205 + viewModel (reset content)Use this when you need to re-render the whole page snapshot (not only one section). CDU will request a full re-render using the provided viewModel. If a section uses a placeholder for the loop source (for example contentLoop: "{{items}}"), returning a new viewModel.items in 205 will rebuild that section's content with the new array:
{
"code": 205,
"data": {
"viewModel": {
"items": [
{ "index": "1", "title": "New A", "amount": "15" },
{ "index": "2", "title": "New B", "amount": "25" }
]
}
}
}
Note: this approach requires building a viewModel for the whole page. After the reset is applied, any previously applied changes are discarded because the page is replaced by a new full snapshot. For updating a single section's contentLoop, method 1 (200 + changes with contentLoop) is usually preferable.
Bbcode - it is a string with pseudo code, that will be converted into HTML.
| bbcode | HTML |
|---|---|
| [b]Bold text[/b] | Bold text |
| [i]Italic text[/i] | Italic text |
| [u]Underline text[/u] | Underline text |
| [ul][*]Unordered list[/*][/ul] |
|
| [iurl=log_in]Internal link[/iurl] | Internal link |
| [url=https://simulator.company] External link[/url] | External link |
| [div]New line[/div] | New line |
| [br] | |
| [color=red]Text color[/color] | Text color |
| [size=12]Font size[/size] | Font size |
| [bg=green]Text back ground[/bg] | Text back ground |
Smart Forms provides flexible CSS styling with support for both legacy single-file styles and modern organized structure with @import capabilities.
Less.js Preprocessing: Smart Forms uses Less format which compiles to CSS on every file save. This enables variables, mixins, functions, and @import statements for better code organization and maintainability.
Each component has a default class that can be accessed and styled. Additionally, to style a specific element, use the "styleClass" property in the component.
You may encounter smart forms where styling is organized in a single style file in the root folder of the project.
Here is an example of component styling in Less format, featuring variables, mixins, and Less-specific functions:
// ===== Mixins =====
// This mixin applies the same background, border and text color on hover and focus.
.hoverState(@bg; @border; @color) {
&:hover,
&:focus {
background-color: @bg !important;
border-color: @border !important;
color: @color !important;
}
}
// This mixin adds a subtle accessible focus ring without shifting layout.
.focusRing(@c: @primaryColor) {
outline: none;
box-shadow: 0 0 0 2px fade(@c, 45%);
transition: box-shadow 0.15s ease;
}
// This mixin truncates overflowing single-line text with an ellipsis.
.truncate() {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
// This mixin generates a tinted hover using a lighter version of a color.
.tintHover(@c; @pct: 12%) {
.hoverState(lighten(@c, @pct); lighten(@c, @pct); @fontColor);
}
// This mixin generates a shaded hover using a darker version of a color.
.shadeHover(@c; @pct: 10%) {
.hoverState(darken(@c, @pct); darken(@c, @pct); @fontColor);
}
// This mixin generates a translucent background from a solid color.
.translucentBg(@c; @alpha: 50%) {
background-color: fade(@c, @alpha);
}
// This mixin adjusts saturation for a more vivid or muted look.
.saturationHover(@c; @pct: 10%) {
.hoverState(saturate(@c, @pct); saturate(@c, @pct); @fontColor);
}
// This mixin sets a contrasting text color based on luminance heuristics.
.onAccent(@c) when (lightness(@c) >= 50%) {
color: #111111;
}
.onAccent(@c) when (lightness(@c) < 50%) {
color: #ffffff;
}
// ===== Tokens =====
// These variables define the core brand colors.
@fontColor: #000000;
@secondaryColor: #EC9704;
@primaryColor: #F7C815;
@primaryOpacityColor: rgba(236,151,2, 0.5);
// These derived tokens use color functions for consistent variants.
@primaryBorderStrong: darken(@primaryColor, 8%);
@primaryBorderWeak: lighten(@primaryColor, 8%);
@primaryFocusHalo: fade(@primaryColor, 45%);
@secondarySoftBg: fade(@secondaryColor, 30%);
@accentTextOnPrimary: if((lightness(@primaryColor) >= 50%), #111111, #ffffff);
// ===== Components =====
// Button styles define visual variants and interactive states.
.button {
// This ensures a visible focus outline for keyboard users.
&:focus-visible { .focusRing(@primaryColor); }
&__menu {
.translucentBg(@primaryColor, 50%);
&__item {
background-color: @primaryColor;
.onAccent(@primaryColor);
}
}
// Default button
&__default {
background-color: @primaryColor;
border-color: @primaryColor;
.onAccent(@primaryColor);
// This reuses the same hover and focus pattern via a shaded variant.
.shadeHover(@primaryColor, 8%);
}
// Text button
&__text {
color: @primaryColor;
.hoverState(@primaryOpacityColor; @primaryOpacityColor; @fontColor);
}
// Secondary button
&__secondary {
border-color: @primaryColor;
color: @primaryColor;
.tintHover(@primaryColor, 18%);
}
// Tertiary button
&__tertiary {
color: @fontColor;
.hoverState(@primaryOpacityColor; @primaryOpacityColor; @secondaryColor);
&:hover,
&:focus {
.fill { fill: @secondaryColor !important; }
}
}
// Quaternary button
&__quaternary {
background-color: @primaryOpacityColor;
border-color: @primaryColor;
color: @secondaryColor;
.hoverState(@primaryOpacityColor; @primaryOpacityColor; @secondaryColor);
}
}
// Check component sets the main accent color for icons.
.check {
.fill { fill: @primaryColor !important; }
}
// Label reserved for future use.
.label {}
// Divider reserved for future use.
.divider {}
// Image reserved for future use.
.image {}
// File reserved for future use.
.file {}
// Carousel reserved for future use.
.carousel {}
// Copy includes an interactive container that tints icons on hover.
.copy {
&__container {
&:hover,
&:focus {
.fill { fill: @primaryColor; }
}
}
}
// Upload component colors edges and glyphs with the accent.
.upload {
&__corner { border-color: @primaryColor !important; }
&__icon {
path { fill: @primaryColor !important; }
}
}
// Widget reserved for future use.
.widget {}
// Edit indicates focus using border and label color plus a halo.
.edit.focus {
.field {
border-color: @primaryColor !important;
box-shadow: 0 0 0 2px @primaryFocusHalo;
}
.label { color: @primaryColor !important; }
}
// Calendar uses a translucent background and solid accents.
.calendar {
.translucentBg(@primaryColor, 50%) !important;
.selected {
border-color: @primaryColor !important;
background-color: @primaryColor !important;
.onAccent(@primaryColor);
}
.button {
border-color: @primaryColor !important;
background-color: @primaryColor !important;
.onAccent(@primaryColor);
&:hover,
&:focus {
background-color: lighten(@primaryColor, 10%) !important;
border-color: @primaryBorderWeak !important;
}
}
}
// Select fields communicate focus with accent border and halo.
.select {
.focus {
.field {
border-color: @primaryColor !important;
.focusRing(@primaryColor);
}
.label { color: @primaryColor !important; }
}
}
// Multiselect mirrors select focus and also accents chips.
.multiselect.focus {
.field { border-color: @primaryColor !important; }
.label { color: @primaryColor !important; }
.chip { border-color: @primaryColor !important; }
}
// Radio uses the accent color for checked state glyphs.
.radio {
.fill { fill: @primaryColor !important; }
}
// Phone reserved for future use.
.phone {}
// Tab items are accented and prevent layout breaks with truncation.
.tab {
&__item {
border-color: @primaryColor !important;
span {
color: @primaryColor !important;
.truncate();
}
&:hover,
&:focus {
background-color: @secondarySoftBg;
}
}
}
// Comments reserved for future use.
.comments {}
// Table uses the accent color for icons and controls.
.table {
.fill { fill: @primaryColor !important; }
&__pagination {
&__button {
color: @primaryColor !important;
border-color: @primaryColor !important;
.hoverState(@primaryOpacityColor; @primaryColor; @fontColor);
&:focus-visible { .focusRing(@primaryColor); }
}
}
&__button {
border-color: @primaryColor;
color: @primaryColor;
.hoverState(@primaryOpacityColor; @primaryColor; @fontColor);
}
}
// Stepper reserved for future use.
.stepper {}
.stepperMobile {}
// Otp highlights focused input with the accent and halo.
.otp {
&__edit.focus {
.field {
border-color: @primaryColor !important;
box-shadow: 0 0 0 2px @primaryFocusHalo;
}
}
}
// Progress bar adopts the primary color for the indicator.
.progressBar { color: @primaryColor !important; }
// Section header and close controls use the accent.
.section {
.close_btn {
.fill { fill: @primaryColor !important; }
}
&__modal__header {
background-color: @primaryColor;
.onAccent(@primaryColor);
}
}
// Modal width sets a fixed maximum for centered dialogs.
.section {
&.modal {
.section__wrap { max-width: 700px; }
}
}
// Slider re-colors track, handle and dots using accent variants.
.slider {
.rc-slider-track { background-color: @primaryColor; }
.rc-slider-handle {
background-color: @primaryColor;
border-color: @primaryBorderStrong;
&:hover,
&:focus {
background-color: lighten(@primaryColor, 6%);
border-color: @primaryBorderWeak;
box-shadow: 0 0 0 2px @primaryFocusHalo;
}
}
.rc-slider-dot-active { border-color: @primaryColor; }
.rc-slider-rail {
height: 20px;
background-color: grey;
border-radius: 0;
}
.slider__footer {
display: none;
margin-top: 8px;
}
.rc-slider-dot {
height: 24px;
width: 8px;
border-radius: 4px;
}
.rc-slider-step { height: 20px; }
}
// Toggle uses border in rest and fills active with the accent.
.toggle {
&__button {
border-color: @primaryColor !important;
.active { background-color: @primaryColor !important; }
&:hover { border-color: darken(@primaryColor, 6%) !important; }
&:focus-visible { .focusRing(@primaryColor); }
}
}
// Attachment adopts a vivid secondary background with contrasting text.
.attachment {
background-color: @secondaryColor !important;
.onAccent(@secondaryColor);
&:hover { background-color: saturate(@secondaryColor, 8%) !important; }
}
// Signature content uses a softer translucent variant of the secondary color.
.signature {
&__content {
background-color: fade(@secondaryColor, 55%) !important;
.onAccent(@secondaryColor);
}
}
For better code organization, you can use the styles folder structure:
📁 styles/
├── 📄 index # Main stylesheet
├── 📄 colors # Color variables
├── 📄 mixins # Reusable mixins
└── 📄 variables # Custom variablesThe index file serves as the main entry point for your styles folder. For the styles to take effect, all other files must be imported into index using @import statements. For example: @import "colors"; or @import "mixins"; to include the colors and mixins files in your main stylesheet.
To create new style files in the styles folder, click next to the styles folder. Remember that these files must be manually imported into the index file using @import statements.
Add style files to individual pages for page-specific styling:
📁 pages/
├── 📁 contact/
│ ├── 📄 config
│ ├── 📄 locale
│ └── 📄 style # Page-specific stylesEach page can have its own style file (displayed as style). Page style files are automatically included at the end of the main index stylesheet and have access to all variables, mixins, and definitions from the index file, allowing you to use existing color schemes and reusable components in your page-specific styles. These styles are isolated from other pages and apply only to the specific page for which they are defined.
To manage page-specific style files, click next to any page folder and select Add styles to create a style file or Remove styles to delete it. These files will be automatically included and don't require manual @import statements.
styles/
├── index # Main stylesheet with imports
├── constants # Variables and color definitions
└── mixins # Reusable style mixinsstyles/constants file:
// Color palette
@primaryColor: #007bff;
@secondaryColor: #6c757d;
@successColor: #28a745;
@dangerColor: #dc3545;
@warningColor: #ffc107;
// Typography
@fontFamily: 'Roboto', sans-serif;
@fontSize: 14px;
@fontWeight: 400;
// Layout
@containerMaxWidth: 1200px;
@borderRadius: 4px;
@boxShadow: 0 2px 4px rgba(0,0,0,0.1);
styles/mixins file:
// Border radius mixin
.border-radius(@radius: @borderRadius) {
border-radius: @radius;
}
// Box shadow mixin
.box-shadow(@shadow: @boxShadow) {
box-shadow: @shadow;
}
// Button variant mixin
.button-variant(@color) {
background-color: @color;
border-color: @color;
&:hover {
background-color: darken(@color, 10%);
border-color: darken(@color, 10%);
}
}
// Flexbox center mixin
.flex-center() {
display: flex;
justify-content: center;
align-items: center;
}
styles/index file:
// Import all definitions
@import "constants";
@import "mixins";
// Global styles using imported definitions
.main-container {
max-width: @containerMaxWidth;
font-family: @fontFamily;
.box-shadow();
}
// Button styles using mixins
.custom-button {
.border-radius(6px);
&.primary {
.button-variant(@primaryColor);
}
&.success {
.button-variant(@successColor);
}
}
// Utility classes
.centered-content {
.flex-center();
}
When you save a style file, automatic Less compilation is performed. If compilation fails, the system provides clear visual feedback to help you quickly identify and fix issues. Files with errors display a red alert icon in the file tree, along with a tooltip showing the specific error message. The code editor also highlights error lines in the gutter, and clicking an error icon moves the cursor directly to the error, making it easy to locate and resolve problems.
Separate concerns: Store your variables, mixins, and component styles in separate files
Use @import: Import common definitions from styles folder
Consistent naming: Use descriptive class names with hyphens (-) for words and double underscores (__) to separate structural elements: .contact-form, .button__primary, .navigation-menu__default-option
Avoid hardcoded URLs: Use Less maps to organize external resources in one place
@images: {
logo: "path/logo.svg";
background: "path/bg.jpg";
};
.header {
background-image: url(@images[logo]);
}
Limit selector nesting: Keep nesting depth under 3 levels for better performance and readability
Use Less comments: Prefer // comments over /* */ format - Less comments are removed during compilation and won't appear in production CSS
Colored icons with masks: Create reusable colored icons using CSS mask property with black and white images - any color can be applied via background-color
.colored-icon(@icon-url; @color: @primaryColor; @size: 24px) {
width: @size;
height: @size;
background-color: @color;
mask: url(@icon-url) center / contain no-repeat;
}
.delete-icon {
.colored-icon(@images[trash], @dangerColor, 20px);
}
External image proxying: When you use external image URLs (starting with https://) in your styles, the system automatically adds the /api/1.0/image?src= prefix to proxy them through our servers for security and performance. Note that images attached to actors are considered internal and are not proxied