Example
Setting a form field value.
const formFieldValue = new FormFieldValue({
name: 'Form field name',
value: 'Form field value'
});
instance.update(formFieldValue);
See Also
Hierarchy
Constructors
Parameters
args{ [key: string]: any }Optional
Properties
Unique name of the form field (often referred to as fully qualified name). This name is used to link form field value to a FormFields.FormField.
optionIndexes
Radio buttons and checkboxes can have multiple widgets with the same form value associated, but can be
selected independently. optionIndexes contains the value indexes that should be actually set.
If set, the value field doesn't get used, and the widget found at the corresponding indexes in the form field's
annotationIds property are checked.
If set on fields other than radio buttons or checkboxes, setting the form value will fail.
defaultValues
Immutable Record API
31
- "[iterator]"(): IterableIterator<
[
"name"
| "isFitting"
| "value"
| "optionIndexes",
| string
| number
| boolean
| NutrientViewer.Immutable.List<string>
| NutrientViewer.Immutable.List<number>
| null
| undefined,
],
>Returns
IterableIterator<
[
"name"
| "isFitting"
| "value"
| "optionIndexes",
| string
| number
| boolean
| NutrientViewer.Immutable.List<string>
| NutrientViewer.Immutable.List<number>
| null
| undefined
]
>
Returns
thisSee Also
Map#asImmutable
Returns
thisSee Also
Map#asMutable
Returns a new instance of this Record type with all values set to their default values.
Returns
this
Returns a new instance of this Record type with the value for the specific key set to its default value.
Parameters
otherunknownReturns
boolean
get<K extends "name" | "isFitting" | "value" | "optionIndexes">(
key: K,
notSetValue?: unknown,
): { … }[K]Returns the value associated with the provided key, which may be the default value defined when creating the Record factory function.
If the requested key is not defined by this Record type, then notSetValue will be returned if provided. Note that this scenario would produce an error when using Flow or TypeScript.
Parameters
keystringReturns
key is "name" | "isFitting" | "value" | "optionIndexes"
Returns
number
Parameters
keyPathIterable<unknown>...collectionsunknown[]Returns
this
Parameters
keyPathIterable<unknown>...collectionsunknown[]Returns
this
Parameters
keyPathIterable<unknown>valueunknownReturns
this
Deeply converts this Record to equivalent native JavaScript Object.
Note: This method may not be overridden. Objects with custom serialization to plain JS may override toJSON() instead.
Returns
{ … }
Shallowly converts this Record to equivalent native JavaScript Object.
Returns
{ … }
Shallowly converts this Record to equivalent JavaScript Object.
Returns
{ … }
- toSeq(): Keyed<
"name"
| "isFitting"
| "value"
| "optionIndexes",
| string
| number
| boolean
| NutrientViewer.Immutable.List<string>
| NutrientViewer.Immutable.List<number>
| null
| undefined,
>Returns
Keyed<
"name"
| "isFitting"
| "value"
| "optionIndexes",
| string
| number
| boolean
| NutrientViewer.Immutable.List<string>
| NutrientViewer.Immutable.List<number>
| null
| undefined
>
Parameters
keyPathIterable<unknown>updater(value: unknown) => unknownReturns
this
Returns
booleanSee Also
Map#wasAltered
Note: Not all methods can be used on a mutable collection or within
withMutations! Onlysetmay be used mutatively.Parameters
mutator(mutable: this) => unknownReturns
thisSee Also
Map#withMutations
Record representing a form field value.
To retrieve a list of all form field values, use Instance#getFormFieldValues.
Please see our forms guide article to learn more about forms and for examples on how to set form field values.