SETVALUE
EngineEvents
Sets a field value during an event.
Example
Code
The value must match the field. Use a number for a NumericField and a string for a TextField. A
SingleChoiceField or BooleanField takes a string ID, and a MultiChoiceField takes an array of
string IDs:
Code
If one call in a handler is rejected, none of that event's operations are applied. Applying a
SETVALUE() recalculates the form, but it does not dispatch change. See
Value updates and normalization.
Parameters
- fieldDataName: string
- valueToSet: any
Returns
Operation descriptor (used by clients).
Try it
You need form0-cli. All event builtin pages use the same test form.
-
Download the form and start the preview:
Code -
Open
http://localhost:3030. -
Enter
7in Amount. Note shows Amount is 7.
Last modified on