Field Form Element
A form element that defines a field in the feature table. The FieldFormElement specifies a field for display on the form. It can also define the user interface for editing values for the field and Arcade expressions to manage element display and behavior.
Since
200.4.0
Properties
The name of the field associated with this element in the com.arcgismaps.data.FeatureTable.fields array.
The field type of the field associated with this element in the com.arcgismaps.data.FeatureTable.fields array.
The formatted value for the field specified by FieldFormElement.fieldName. This property is updated when FeatureForm.evaluateExpressions is called unless FieldFormElement.isEditable is true. Dates and times are returned in the local timezone. If a field is part of a com.arcgismaps.data.CodedValueDomain, com.arcgismaps.data.CodedValue.name is returned.
True if the element has a value expression, false otherwise.
True if the element is editable. False if the element is not editable. This property can be modified by the editable expression, which can be set during Feature Form authoring.
True if the element is required. False if the element is not required. This property is always true if the FieldFormElement.fieldName is the com.arcgismaps.data.ArcGISFeatureTable.typeIdField or the field is non-nullable. Otherwise, it depends on the result of the required expression. Additionally, if FieldFormElement.isVisible is false, the required expression is ignored and false is returned.
An array of errors collected when the value is validated. An empty array indicates the element's value is valid. The constraints depend on the type of FieldFormElement.input. For example a FieldFormElement with an input type of TextBoxFormInput may not be empty if the value of FieldFormElement.isRequired is true. The errors returned for each key is an array of any of the following types:
The attribute value for the field specified by FieldFormElement.fieldName. If the field is part of a com.arcgismaps.data.CodedValueDomain, the com.arcgismaps.data.CodedValue.code is returned (unlike FieldFormElement.formattedValue, which returns the com.arcgismaps.data.CodedValue.name)
Inherited properties
A detailed description of the element.
A descriptive label that appears with the element. If not supplied, a FieldFormElement is labeled with the alias property of the associated field.
Unknown data from the source JSON. Unknown JSON is a dictionary of values that was in the source JSON but was unparsed by the Runtime.
Unsupported data from the source JSON. Unsupported JSON is a dictionary of values that are supported by web maps, but not exposed through the native Runtime API.
Functions
Updates the value of a field in the feature associated with the FieldFormElement. This function expects you to pass at least the correct type of value for the field. After the value is updated, FeatureForm.evaluateExpressions should be called in order to update any dependent properties. After the value has been updated, the list of validation errors will be updated and the FieldFormElement.validationErrorsChanged event will be fired if the list of errors has changed.