Skip To Content ArcGIS for Developers Sign In Dashboard

Web Map Specification

formFieldElement

Defines how a field in the dataset participates in the form.

Referenced by: formGroupElement, formInfo

Properties

Property Details
description A string that describes the element in detail.
domain The domain to apply to this field. If defined, it takes precedence over domains defined in field, type, or subtype.
editable A Boolean determining whether users can edit this form element. If not supplied, the editable state is derived from the editable property of referenced field in the service.
fieldName A string containing the field name as defined by the feature layer.
hint A string providing an editing hint for editors of the form element.
inputType The input user interface to use for the element. If an input type is not supplied or the client application does not understand the supplied input type, the client application is responsible for defining the default user interface.
Must be one of the following values:
label A string indicating what the element represents. If not supplied, the label is derived from the alias property in the referenced field in the service.
requiredExpression A reference to an Arcade expression that returns a boolean value. When this expression evaluates to true and the element is visible, the element must have a valid value in order for the feature to be created or edited. When the expression evaluates to false the element is not required. If no expression is provided, the default behavior is that the element is not required. If the referenced field is non-nullable, the required expression is ignored and the element is always required.
type A string indicating which type of element to use.
Value of this property must be field
visibilityExpression A reference to an Arcade expression that returns a boolean value. When this expression evaluates to true, the element is displayed. When the expression evaluates to false the element is not displayed. If no expression is provided, the default behavior is that the element is displayed. Care must be taken when defining a visibility expression for a non-nullable field i.e. to make sure that such fields either have default values or are made visible to users so that they can provide a value before submitting the form.

Example

{
  "type": "field",
  "fieldName": "tree_type",
  "label": "Tree Type",
  "description": "The type of the tree",
  "inputType": {
    "type": "combo-box"
  },
  "hint": "e.g. apple, pear, pine",
  "editable": true
}

Example

{
  "type": "field",
  "fieldName": "height",
  "label": "Height of the tree",
  "description": "The height of the tree in feet",
  "inputType": {
    "type": "text-box"
  },
  "requiredExpression": "expr1"
}

Example

{
  "type": "field",
  "fieldName": "needs_trimming",
  "description": "Indicates the tree needs to be trimmed",
  "domain": {
    "type": "codedValue",
    "name": "Needs Trimming",
    "codedValues": [
      {
        "name": "Yes",
        "code": "yes"
      },
      {
        "name": "No",
        "code": "no"
      }
    ]
  },
  "inputType": {
    "type": "combo-box"
  },
  "visibilityExpression": "expr2"
}

Feedback on this topic?