FieldConfig
require(["esri/widgets/FeatureForm/FieldConfig"], function(FieldConfig) { /* code goes here */ });
Class:
esri/widgets/FeatureForm/FieldConfig
Inheritance: FieldConfig Accessor
Since: ArcGIS API for JavaScript 4.9
Configuration options for displaying an individual field within the FeatureForm widget.
Example:
const featureForm = new FeatureForm({
container: "formDiv", // HTML div
layer: featureLayer, // Pass in feature layer
// Configure fields to display
fieldConfig: [{
name: "Incident_desc",
options: {
label: "Description"
}
},
{
name: "Incident_Address",
options: {
label: "Contact"
}
}]
});
Constructors
- new FieldConfig(properties)
- Parameter:properties Objectoptional
See the properties for a list of all the properties that may be passed into the constructor.
Example:let fieldConfig = new FieldConfig( { name: "IncidentType", options: { label: "Choose incident type" } } );
Property Overview
Any properties can be set, retrieved or listened to. See the Working with Properties topic.
Name | Type | Summary | Class | |
---|---|---|---|---|
String | The name of the class. more details | more details | Accessor | |
String | The field name. more details | more details | FieldConfig | |
FieldOptions | The field options. more details | more details | FieldConfig |
Property Details
- Since: ArcGIS API for JavaScript 4.7
The name of the class. The declared class name is formatted as
esri.folder.className
.
- nameString
The field name.
- optionsautocast
The field options.
Loading...