Feature Form
Defines the user interface (form configuration) to display when editing a feature. A web map may define forms for editing features in a feature layer. A layer's form definition is available from the com.arcgismaps.mapping.layers.FeatureLayer.featureFormDefinition and can be used to create a feature form.
Since
200.4.0
Constructors
Creates a FeatureForm for the com.arcgismaps.data.ArcGISFeature. If the feature's com.arcgismaps.mapping.layers.FeatureLayer, com.arcgismaps.data.ArcGISFeatureTable, or the com.arcgismaps.mapping.layers.SubtypeSublayer specific to the feature's com.arcgismaps.data.FeatureSubtype has been authored with a FeatureFormDefinition, then this authored FeatureFormDefinition will be used to create the FeatureForm. If a FeatureFormDefinition is not found, a default definition is generated and used to create the FeatureForm.
Create a form that contains a user interface for editing the specified feature.
Properties
A default AttachmentsFormElement for displaying and editing the feature's attachments. Few of the tools used to author a FeatureForm support adding attachment elements. This default AttachmentsFormElement can be used to provide a default attachment editing experience to the users of your app, in lieu of an element from the authoring environment.
The feature form definition used to define the user interface for the form.
A description of the form.
An ordered list of the elements contained by the form.
The feature displayed in the form.
If true, the value for a previously visible FieldFormElement is retained when it (or its parent) is hidden. The default is false, meaning the value is cleared when an element is hidden.
A dictionary mapping from FieldFormElement.fieldName to an array of errors. An empty dictionary indicates that all element's values are valid. Constraints are expressed by the FormInput and the value of FieldFormElement.isRequired of the element. The constraints depend on the type of FormInput. The errors returned for each key is an array of any of the following types:
Functions
Discards edits to FeatureForm.elements and their associated com.arcgismaps.data.Feature.attributes. Edits are discarded but the Feature is not refreshed. Values will be reset to the values at the time of FeatureForm creation.
Asynchronously evaluates all form expressions. An expression can include Arcade FeatureSet functions, which need to be evaluated asynchronously. Upon completion the task provides a set of FormExpressionEvaluationError providing diagnostic information about errors encountered during evaluation of expressions. An empty list indicates no errors were encountered.
Saves edits made using the FeatureForm to the database. Commits changes to the com.arcgismaps.data.ArcGISFeature and its attachments to the database. Note that calling com.arcgismaps.data.FeatureTable.updateFeature manually is not required.