fieldInfo

Defines how a field in the dataset participates (or does not participate) in a pop-up window. See popupInfo to learn more about where and how to use this object.

Properties

Property

Details

fieldName

A string containing the field name as defined by the service.

format

A format object used with numerical or date fields to provide more detail about how the value should be displayed in a web map pop-up window.

isEditable

A Boolean determining whether users can edit this field.

label

A string containing the field alias. This can be overridden by the web map author.

stringFieldOption

A string determining what type of input box editors will see when editing the field. Applies only to string fields. Acceptable values are as follows:

  • textbox—A single-line input box
  • textarea—A multiple-line input box
  • richtext—A rich text editor allowing for bold text, highlighting, and so forth

tooltip

A string providing an editing hint for editors of the field. This string could provide a short description of the field and how editors should format or supply its value.

visible

A Boolean determining whether the field is visible in the pop-up window.

Example

This example shows fieldInfos that might be configured on a wildfires dataset, including the OBJECTID, fire name, fire start date, fire end date, and number of acres burned.

"fieldInfos": [
        {
          "fieldName": "OBJECTID",
          "label": "OBJECTID",
          "isEditable": false,
          "tooltip": "",
          "visible": false,
          "stringFieldOption": "textbox"
        },
        {
          "fieldName": "NAME",
          "label": "Fire name",
          "isEditable": true,
          "tooltip": "Nickname of fire",
          "visible": true,
          "stringFieldOption": "textbox"
        },
        {
          "fieldName": "ACRES",
          "label": "Acres burned",
          "isEditable": true,
          "tooltip": "Number of acres burned",
          "visible": true,
          "format": {
            "places": 1,
            "digitSeparator": true
          },
          "stringFieldOption": "textbox"
        },
        {
          "fieldName": "START",
          "label": "Start date",
          "isEditable": true,
          "tooltip": "Fire start date",
          "visible": true,
          "format": {"dateFormat": "dayShortMonthYear"},
          "stringFieldOption": "textbox"
        },
        {
          "fieldName": "END",
          "label": "End date",
          "isEditable": true,
          "tooltip": "End date of fire",
          "visible": true,
          "format": {"dateFormat": "dayShortMonthYear"},
          "stringFieldOption": "textbox"
        }
      ]
12/11/2012