FeatureForm and domains in JSAPI 4.17

272
0
10-28-2020 06:20 AM
MKY
by
New Contributor III

FeatureForm does not show coded value domains descriptions when editable is set to false. See WorkType field name below.

      const featureLayer = new FeatureLayer({
        url: "https://ddotgis.dc.gov/arcgis/rest/services/Test/TestPoint/FeatureServer/0",
        outFields: ["*"],
        formTemplate: {
          // Autocasts to new FormTemplate
          title: "Test Point",
          description: "",
          elements: [{
            // Autocasts to new GroupElement
            type: "group",
            label: "",
            description: "",
            elements: [{
                // Autocasts to new FieldElement
                type: "field",
                fieldName: "BudgetYear",
                label: "Budget Year"
              },
              {
                type: "field",
                fieldName: "WorkType",
                label: "Work Type",
                editable: false
              },
              {
                type: "field",
                fieldName: "ProjectStatus",
                label: "Status"
              },
              {
                type: "field",
                fieldName: "PercentCompleted",
                label: "Percentage"
              }
            ]
          }]
        } // end of form template elements
      });

Test site: https://codepen.io/markoskifle/pen/OJXzeyq?editors=1000  

0 Replies