setFormValue
Sets a form value. There are two different types of forms, such as named and unnamed. Named forms are stored in the memory and only persist until the application is fully closed, at which pooint they are removed. Unnamed forms are attached to the view where they are used and only persist until the view is destroyed, at which point they are removed.
Field Configurations
Key | Type | Description | Default Value |
---|---|---|---|
"params" (required) | Object | undefined | null |
Parameters
Key | Type | Description | Default Value |
---|---|---|---|
"async" | Boolean | Specifies whether the action should perform asynchronously. | null |
"form" | String | Name of the form (Only for named forms). | null |
"key" (required) | String | Name of the form value. | null |
"value" (required) | String | Value of the form value. | null |
Inherited
From Base Action
Base Action
Field Configurations
Key | Type | Description | Default Value |
---|---|---|---|
"dynamicParams" | Object | Dynamic params to retrieve data from a specific context e.g. a userSetting. | null |
"leadingDelimiter" | String | The leading mustache delimiter to use. | null |
"params" | Object,Array | Object containing the properties of the action. | null |
"trailingDelimiter" | String | The trailing mustache delimiter to use. | null |
"type" | String | Type 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.