Skip To Content ArcGIS for Developers Sign In Dashboard

Web Map Specification

formInfo

Defines the form configuration when a user edits a feature.

Referenced by: Feature Layer (ArcGISFeatureLayer), table

Properties

Property Details
description A string that appears in the body of the form as a description.
expressionInfos List of Arcade expressions used in the form.
formElements An array of formElement objects that represent an ordered list of form elements.
Array of items of the following types:
  • formFieldElement
    Defines how a field in the dataset participates in the form.
  • formGroupElement
    Defines a container that holds a set of form elements that can be expanded, collapsed, or displayed together.
  • formAttachmentElement
    Defines how one or more attachments can participate in the form.
  • formRelationshipElement
    Defines how a relationship between feature layers and tables can participate in the form.
title A string that appears at the top of the form as a title.

Example

{
  "title": "Form with just fields",
  "formElements": [
    {
      "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
    },
    {
      "type": "field",
      "fieldName": "height",
      "label": "Height of the tree",
      "description": "The height of the tree in feet",
      "inputType": {
        "type": "text-box"
      },
      "requiredExpression": "expr1"
    },
    {
      "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"
    }
  ],
  "expressionInfos": [
    {
      "name": "expr1",
      "title": "Is Pine Tree",
      "expression": "$feature.tree_type == 3",
      "returnType": "boolean"
    },
    {
      "name": "expr2",
      "title": "Tall Tree",
      "expression": "$feature.height >= 50 ",
      "returnType": "boolean"
    }
  ]
}

Example

{
  "title": "Form with all element types",
  "formElements": [
    {
      "type": "group",
      "label": "Tree Information",
      "formElements": [
        {
          "type": "field",
          "fieldName": "tree_type",
          "label": "Fruit Type",
          "inputType": {
            "type": "radio-buttons"
          }
        },
        {
          "type": "attachment",
          "attachmentKeyword": "image-of-tree",
          "label": "Image of tree",
          "description": "Take a photo of the tree",
          "inputType": {
            "type": "image"
          }
        }
      ]
    },
    {
      "type": "group",
      "label": "Physical Characteristics",
      "formElements": [
        {
          "type": "field",
          "fieldName": "tree_height",
          "label": "Tree Height"
        },
        {
          "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": "expr1"
        }
      ]
    },
    {
      "description": "Inspection Reports",
      "displayCount": 3,
      "displayType": "list",
      "editable": true,
      "label": "Inspections",
      "orderByFields": [
        {
          "field": "inspectionDate",
          "order": "desc"
        }
      ],
      "relationshipId": 0,
      "type": "relationship"
    }
  ],
  "expressionInfos": [
    {
      "name": "expr1",
      "title": "Is Tall Tree",
      "expression": "$feature.tree_height > 50",
      "returnType": "boolean"
    }
  ]
}

Feedback on this topic?