FieldGroupConfig

require(["esri/widgets/FeatureForm/FieldGroupConfig"], function(FieldGroupConfig) { /* code goes here */ });
Class: esri/widgets/FeatureForm/FieldGroupConfig
Inheritance: FieldGroupConfig Accessor
Since: ArcGIS API for JavaScript 4.10

Configuration options for displaying a group of fields within the FeatureForm widget. The widget automatically detects if field grouping should apply based on how the widget's fieldConfig property is configured.

See also:
Example:
const featureForm = new FeatureForm({
  container: "formDiv",
  fieldConfig: [{
    label: "First group",
    description: "This is the first group in the FeatureForm",
    fieldConfig: [{
      name: "StreetName",
      label: "Street Name",
      description: "Updated street name"
    },
    {
      name: "AOI",
      label: "Area of Interest",
      description: "Fun places to visit"
    },
  ]},
    {
      label: "Second group",
      description: "This is the second group for the FeatureForm",
      fieldConfig: [{
        name: "telephone",
        label: "Contact number",
        description: "Get in touch by phone"
      },
      {
        name: "emailaddress",
        label: "Email address",
        description: "Get in touch through email"
      }]
  ]}
});

Constructors

new FieldGroupConfig(properties)
Parameter:
properties Object
optional

See the properties for a list of all the properties that may be passed into the constructor.

Property Overview

Any properties can be set, retrieved or listened to. See the Working with Properties topic.
NameTypeSummaryClass
String

The name of the class.

more details
more detailsAccessor
String

The field's description.

more details
more detailsFieldGroupConfig
FieldConfig[]

The field configurations belonging to a group.

more details
more detailsFieldGroupConfig
String

The field's label.

more details
more detailsFieldGroupConfig

Property Details

declaredClassStringreadonly inherited

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

descriptionString

The field's description. The description is shown below the field.

The field configurations belonging to a group. For an example of grouped field configurations, please refer to the Update Feature Attributes sample.

Examples:
// Individual field configurations without grouping
const featureForm = new FeatureForm({
  container: "formDiv",
  feature: graphic, // Pass in feature
  // Configure fields to display without grouping
  fieldConfig: [ // autocasts as FieldConfig
    {
      name: "Incident_desc",
      label: "Description"
    },{
      name: "Incident_Address",
      label: "Contact"
   }]
});
// Grouped field configurations
const featureForm = new FeatureForm({
  container: "formDiv",
  feature: graphic,
  fieldConfig: [{ // autocasts to FieldGroupConfig
    label: "Inspector", // group 1
    description: "Inspector information",
    // Individual field configurations within the group
    fieldConfig: [{
      name: "inspector",
      label: "Name"
    },
    {
      name: "inspemail",
      label: "Email address"
    }]
   }, {
    label: "Business", // group 2
    description: "Business information",
    // Individual field configurations within the group
    fieldConfig: [{
      name: "placename",
      label: "Business name"
    }, {
      name: "firstname",
      label: "First name"
    }]
  }]
});
labelString

The field's label. The label is shown above the field.

API Reference search results

NameTypeModule
Loading...