Skip to content
import FieldInput from "@arcgis/core/widgets/FeatureForm/FieldInput.js";
Inheritance:
FieldInputEditableInput<FieldElement | null | undefined>InputBaseAccessor
Since
ArcGIS Maps SDK for JavaScript 4.27

This is a read-only support class that represents a field's input. It helps provide a consistent API for the different types input used by the FeatureForm widget. The values are computed internally by the FeatureFormViewModel.

See also

Constructors

Constructor

Constructor
Parameters
ParameterTypeDescriptionRequired
properties
See the properties table for a list of all the properties that may be passed into the constructor.

Properties

Any properties can be set, retrieved or listened to. See the Watch for changes topic.
PropertyTypeClass
dataType
readonly
declaredClass
readonly inherited
domain
readonly
editable
readonly
editType
inherited
error
readonly
field
readonly
group
readonly
hint
readonly
includeDate
readonly
includeTime
readonly
inputType
readonly
label
readonly
maxLength
readonly
minLength
readonly
name
readonly
submittable
readonly
type
readonly
"field"
updating
readonly
valid
readonly
visible
readonly

dataType

readonly Property
Type
FieldInputDataTypes

The type of data displayed by the field input. Possible values are listed below.

ValueDescription
numberInput represents a number.
textInput represents text.
dateInput represents a date.
unsupportedThe field represents an unsupported value. A blob field type is an example of this.

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor

The name of the class. The declared class name is formatted as esri.folder.className.

domain

readonly Property
Type
DomainUnion | null | undefined

The input value's domain. This is used to constrain the allowable values of the layer.

editable

readonly Property
Type
boolean

Indicates if the field is editable.

editType

inherited Property
Type
EditType
Inherited from: EditableInput

The value that will be set for the Arcade variable $editcontext.editType in the Arcade context used to evaluate form expressions.

Accepted values are "INSERT", "UPDATE", "DELETE", and "NA".

For FieldInputs with value expressions, this property is also used in determining whether or not the value expressions should be applied. Per the Web Map Specification, value expressions are ignored if the associated layer field is not editable. Determining whether the layer field is editable must consider whether the specific type of edit being attempted is allowed. For example, if a layer has the supportsAdd capability but does not have the supportsUpdate capability, then the value expression will be applied if editType is INSERT but ignored if editType is UPDATE.

For the purposes of determining whether or not the layer allows the current edit type, a value of "NA" is always considered allowed.

Default value
"NA"

error

readonly Property
Type
string | null | undefined

If the input field's value is invalid, this property returns a validation error code. Otherwise, it is null.

field

readonly Property
Type
Field

The associated field.

group

readonly Property
Type
GroupInput | null | undefined

The group containing the field input.

hint

readonly Property
Type
string | null | undefined

A hint for the field's value. This is a temporary placeholder inputs in either TextAreaInput or TextBoxInput.

includeDate

readonly Property
Type
boolean

Indicates whether date information is included for date inputs.

Default value
true

includeTime

readonly Property
Type
boolean

Indicates whether time information is included for date inputs.

Default value
true

includeTimeOffset

readonly Property
Type
boolean
Since
ArcGIS Maps SDK for JavaScript 4.28

Indicates whether timestamp information is included for date inputs.

Default value
false

inputType

readonly Property
Type
InputType | null | undefined

The type of editor used when working with string fields. Possible values are in the table below.

ValueDescription
text-boxAn HTML textbox used to capture input.
text-areaAn HTML textarea used to capture input.
Default value
"text-box"

label

readonly Property
Type
string

The field's label.

maxLength

readonly Property
Type
number

Restricts the input length.

minLength

readonly Property
Type
number

Restricts the input length.

name

readonly Property
Type
string

The associated field name.

required

autocast Property
Type
boolean

Indicates whether the field is required. If the field is not editable, this property returns false.

submittable

readonly Property
Type
boolean

Indicates if the field's value can be submitted without introducing data validation issues.

type

readonly Property
Type
"field"

The type of input.

updating

readonly Property
Type
boolean

Indicates if the field is updating. This is applicable if the field has a value defined for FieldElement.valueExpression or FieldElement.editableExpression. The property returns true whenever one or both of these expressions are processing. If the field belongs to a form configured with preserveFieldValuesWhenHidden set to false, this will also be true when FieldElement.visibilityExpression is processing.

valid

readonly Property
Type
boolean

Indicates if the input value is valid.

value

Property
Type
FieldValue

The field input's value.

visible

readonly Property
Type
boolean

Indicates if the field is visible.