Advanced Attribute Editing
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.
Instead of displaying all of the specified fields in various form elements, certain fields display based on whether they meet a specified condition. It does this using the visibilityExpression
property found on both FieldElement and GroupElement classes. This property takes an Arcade expression and if it resolves to true
the field renders within the form.
The first field element displays a field labeled Issue status
. If the value is Completed
and the Resolution
field is not empty, the second field labeled Resolution
will display. Based on the status
field, one or two grouped fields display.
Prior to version 4.16, formatting fields and groupings was handled via FieldConfig and/or FieldGroupConfig configurations. Moving forward, the preferred way is through setting a feature layer and/or form's formTemplate property. This property accepts an array of field and/or group elements.