Generic Form Step – generic-form-ui
Type | Description |
---|---|
| Shows a generic form with fields defined by a step. It stores the form result data in either an Advanced Configuration Option field with a name defined by the step, or Company Parameter table, depending on which of the two attributes ( This step is the basis for configuring Accelerators (Solution Forms). |
Specific Attributes
Attribute Name | Description | Example | Required |
---|---|---|---|
| Specifies the name of a field in the Advanced Configuration Option table. |
| one of these is required |
| Specifies the name of a Company Parameter table. |
| |
| Specifies an array of supported fields. The supported fields are defined in Solution Form Attributes. | [
{
"name": "test",
"label": "Test",
"type": "string",
"placeholder": "Input something",
"required": true,
"default": "cool",
"mode": "default" | "multiple" | "tags"
}
] | true |
| Used only in case of the Advance Configuration Option table. It tries to merge the AP value with a result of the step. Works only if the AP + AP's original value are JSON objects. |
| false |
validators | Specifies an array of validators which will be applied to the step. Validators can use parameters from a form defined in the step or from the shared state.
| [
{
"type": "not-equal",
"parameters": [
{
"type": "form",
"name": "testInput"
},
{
"type": "shared-state",
"name": "testState"
}
]
}
] | false |
Example for Advanced Configuration Option:
Example
{
"type": "generic-form-ui",
"name": "generic-form",
"apName": "slavik_test_ap",
"form": [
{
"name": "test",
"label": "Test",
"type": "string",
"placeholder": "Input something",
"required": true,
"default": "buaaa :-)"
"fixed" : true //Create field as constant (User cannot change a value)
},
{
"name": "test2",
"label": "Test2",
"type": "int",
"placeholder": "WTF is happening",
"default": 42
},
{
"name": "multiSelect",
"label": "Test3",
"type": "select",
"mode": "multiple",
"options": [
{
"value": "v1",
"label": "label1"
},
{
"value": "v2",
"label": "label2"
}
],
"placeholder": "Cool select is here",
"required": true,
"default": "v1"
}
]
}
PlatformManager version 1.75.0