Skip to main content
Version: 4.58

setFormValue

Sets a specified value to a form layer with the specified name (key).

Field Configurations​

KeyTypeDescriptionDefault Value
"params" (required)Objectundefinednull

Parameters​

KeyTypeDescriptionDefault Value
"async"BooleanSpecifies whether the action should perform asynchronously.null
"form"StringName of the form (Only for named forms).null
"key" (required)StringName of the form value.null
"value" (required)StringValue of the form value.null

Inherited​

From Base Action

Base Action

Field Configurations

KeyTypeDescriptionDefault Value
"dynamicParams"ObjectDynamic params to retrieve data from a specific context e.g. a userSetting.null
"leadingDelimiter"StringThe leading mustache delimiter to use.null
"params"Object,ArrayObject containing the properties of the action.null
"trailingDelimiter"StringThe trailing mustache delimiter to use.null
"type"StringType name of the action.null

Examples​

Example 1: Create a named form value.​

Goal: Set value "Berlin" to the named form "adress" for the key "city".

Form, key and value have to be assigned within the params object of the action.

{
"type": "setFormValue",
"params": {
"form": "adress",
"key": "city",
"value": "Berlin"
}
}

Result:

The value "Berlin" is set to the named form "adress" under the key "city".

Example 2: Create an unnamed form value.​

Goal: Set value "Germany" to the key "country" in an unnamed form.

Key and value have to be assigned within the params object of the action.

{
"type": "setFormValue",
"params": {
"key": "country",
"value": "Germany"
}
}

Result:

The value "Germany" is set to the key "country" in an unnamed form.