A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.arcgis.com/javascript/latest/sample-code/editing-groupedfeatureform/index.html below:

Update Feature Attributes | Sample Code | ArcGIS Maps SDK for JavaScript 4.33

This sample demonstrates how to use FeatureLayer.applyEdits() to update attributes of existing features. This sample uses the FeatureForm widget to update attributes of existing features by calling the applyEdits function when a user selects a feature on the view.

The form's fields are configured via a form template. This template accepts an array of field elements combined in a group. Having grouped field configurations provides a more manageable editing workflow. This sample uses nested elements which autocast to group elements.

Use dark colors for code blocks Copy

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
...
formTemplate: { // Autocasts to new FormTemplate
  title: "Damage assessments",
  description: "Provide information for insurance",
  elements: [
    { // Autocasts to new GroupElement
      type: "group",
      label: "Inspector Information",
      description: "Field inspector information",
      elements: [
        { // Autocasts to new FieldElement
          type: "field",
          fieldName: "inspector",
          label: "name"
        },
        {
          type: "field",
          fieldName: "inspemail",
          label: "Email address",
          visibilityExpression: "alwaysHidden" // reference to an expression defined under "expressionInfos"
        },
        {
          type: "field",
          fieldName: "insp_date",
          label: "Date of inspection"
        }
      ]
    }
  ]
}
...

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4