Generic Form Step – generic-form-ui

Type

Description

Type

Description

generic-form-ui

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 (apName, ppName) is specified.

This step is the basis for configuring Accelerators (Solution Forms). 

Specific Attributes

Attribute Name

Description

Example

Required

Attribute Name

Description

Example

Required

apName

Specifies the name of a field in the Advanced Configuration Option table.

"slavik_test_ap"

one of these is required



ppName

Specifies the name of a Company Parameter table.

"form_test_pp"

form

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

merge

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.

"merge": true

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 – Type of the validator. Currently, the only supported type is not-equal validator which takes 2 parameters and checks that the values are not equal.

  • parameters – List of parameters for the validator. Parameters can be of the type form or shared-state; name is the name of the field.

[ { "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