FieldFormElement

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

Link copied to clipboard

The domain to apply to this field. If defined, this takes precedence over domains defined for the field, type, or subtype.

Link copied to clipboard

The name of the field associated with this element in the FeatureTable.fields array.

Link copied to clipboard

The field type of the field associated with this element in the FeatureTable.fields array.

Link copied to clipboard

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 CodedValueDomain, CodedValue.name is returned.

Link copied to clipboard

True if the element has a value expression, false otherwise.

Link copied to clipboard

Placeholder text that can be applied to text or numeric inputs.

Link copied to clipboard

The input user interface to use for the element. If the client application does not understand the supplied input, the client application is responsible for defining the default user interface.

Link copied to clipboard
val isEditable: StateFlow<Boolean>

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.

Link copied to clipboard
val isRequired: StateFlow<Boolean>

True if the element is required. False if the element is not required. This property is always true if the FieldFormElement.fieldName is the 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.

Link copied to clipboard

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:

Link copied to clipboard
val value: StateFlow<Any?>

The attribute value for the field specified by FieldFormElement.fieldName. If the field is part of a CodedValueDomain, the CodedValue.code is returned (unlike FieldFormElement.formattedValue, which returns the CodedValue.name)

Inherited properties

Link copied to clipboard

A detailed description of the element.

Link copied to clipboard
val isVisible: StateFlow<Boolean>

The form element's visibility. This property can be modified by the visibility expression.

Link copied to clipboard

A descriptive label that appears with the element. If not supplied, a FieldFormElement is labeled with the alias property of the associated field.

Link copied to clipboard

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.

Link copied to clipboard

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

Link copied to clipboard
fun updateValue(value: Any?)

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, the list of validation errors will be updated and the FieldFormElement.validationErrorsChanged event will be fired if the list of errors has changed.

Inherited functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int