Form Parsing
data format accepted by the parseForm function
[
{
"key": "body_panel",
"components": [
{
"label": "Юридическое лицо",
"key": "agreementLegalEntity",
"properties": {
"attribute": "_ECM_contracts:agreementLegalEntity"
},
"type": "selectJournal",
"input": true,
"value": ""
},
...
]
},
{
"key": "footer_panel",
"components": [
{
"type": "columns",
"columns": [
{
"components": [
{
"label": "Rework",
"key": "outcome_Rework",
"type": "button",
"action": "submit"
},
...
]
},
...
]
},
{
"label": "Rework",
"key": "outcome_Rework",
"type": "button",
"action": "submit"
},
...
]
},
...
]
Getting elements for display in the properties list:
components from the first-level array are filtered by the key
"key": "body_panel"iterate through the
componentsarray elements, filter them by the"input": truepropertyif
"type": "button", the element is selected for passing to the render function, thelabelattribute is used for localization. Elements with other types are also selected for rendering, with the exception that for localization, theattributeproperty is used with the ‘_ECM_’ prefix trimmeddata is linked to the form by the
attributekeythe value property is used for display in the interface, formatted as a string or date depending on
type
Getting elements for display on the approval panel (buttons):
components from the first-level array are filtered by the key
"key": "footer_panel"iterate through the
columns.componentsarray elements, filter them by the"type": buttonproperty. If elements with typecolumnsare encountered, it’s necessary to select the first element of the array in thecomponentsproperty. Thelabelattribute is used for localizationthe button click handler expects a value from the
labelproperty