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 Deprecated, use editableExpression instead.
editableExpression A reference to an Arcade expression that returns a boolean value. When this expression evaluates to true, the element is editable. When the expression evaluates to false the element is not editable. If the referenced field is not editable, the editable expression is ignored and the element is not editable.
fieldName A string containing the field name as defined by the feature layer.
hint A string representing placeholder text. This only applies for input types that support text or numeric entry.
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.
Valid value of this property field
valueExpression A reference to an Arcade expression that returns a date, number, or string value. When this expression evaluates the value of the field will be updated to the result. This expression is only evaluated when editableExpression (if defined) or editable is false. If the referenced field is not editable, the expression is ignored.
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",
  "editableExpression": "expr3",
  "fieldName": "tree_type",
  "label": "Tree Type",
  "description": "The type of the tree",
  "inputType": {
    "type": "combo-box"
  },
  "hint": "e.g. apple, pear, pine"
}

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",
  "editableExpression": "expr1",
  "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"
}

Example

{
  "type": "field",
  "editableExpression": "expr3",
  "fieldName": "inspection_date",
  "label": "Today's date",
  "inputType": {
    "type": "datetime-picker"
  },
  "valueExpression": "expr2",
  "visibilityExpression": "expr3"
}

Example

{
  "type": "field",
  "editableExpression": "expr4",
  "fieldName": "fertilizer_amount",
  "label": "Fertilizer to apply",
  "inputType": {
    "type": "text-box"
  },
  "valueExpression": "expr2"
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.