The Edit widget provides users with feature and record editing capabilities in 2D and 3D. Use the Edit widget with another data-connected widget, such as Table, Feature Info, or Map, to allow users to add, delete, and update features in the source data. The geometry mode supports 2D and 3D editing, including move, scale, rotate geometries, and vertices editing. You can choose which fields to display, organize the fields in collapsible groups with meaningful headings, and provide instructions for editing each field. When connected to a map with a form configured for the selected layer, the widget can display the form (including conditional visibility for fields).
Examples
Use this widget to support app design requirements such as the following:
- You want users to be able to update the attributes of selected features or records.
- You want users to be able to modify the shape of a feature in a map or scene from the Map widget.
Usage notes
This widget requires adding editable data. When you add an Edit widget, you must add at least one other widget, such as Table, List, Feature Info, or Map, that uses the same data source. The Edit widget only supports selected features view, so a feature must be selected in the other widget for its data to appear in the Edit widget. To edit geometry, the widget must be connected to a Map widget.
You must configure this widget with one of two edit modes, Attribute only or Geometry and attribute. When you include the widget in an app with Geometry and attribute mode selected, the widget provides users with the following tools and settings:
- Enable tooltips—Show numerical information while drawing features. You can press Tab while drawing to type in values for segment lengths, angles, and elevation.
- Enable snapping—Snapping allows you to create features that connect to each other. The pointer will jump, or snap to, nearby edges, vertices, and other geometric elements. Turn on this setting to enable the following tools (if they are configured in the widget settings):
- Geometry guides—Allows snapping to the feature being created, and shows smart guides such as 90 degrees and parallel.
- Feature to feature—Allows snapping to other features.
- Snapping layers—Choose which editable layers should work with the enabled snapping tools.
- Edit features—Edit the features of the specified data sources.
- Create features—Add features to the data sources from the specified Map widget.
When you include the widget in an app with Attribute only mode selected, the widget includes tools for updating and deleting records.
When you include the widget in an app with Geometry and attribute mode selected, the widget supports editing related table records and related feature records. To edit related records for a layer, you must specify a related records element in Map Viewer.
Editing privileges
Editing privileges depend on where you access the Edit widget and your account type.
The following rules apply for all users accessing the Edit widget in the builder environment:
- You can import all feature layers regardless of whether the layers are set to editable in their service-level settings.
- If a layer is noneditable, it is added in a read-only state and you can only choose display fields from the layer.
The following privileges apply to users accessing the Edit widget in an app at run time:
- Organization administrators, app owners, and members of shared update groups have full editing capabilities, meaning they can override any service-level configurations.
- Users with fullEdit privileges cannot override service-level configurations to edit records, but can override service-level configurations to add, delete, and update geometry for records.
- All other users have editing privileges that adhere to service-level configurations and account privileges.
Settings
The Edit widget includes the following settings:
- Choose an edit mode.
- Attribute only—Allows users to edit the attributes of the specified data sources (without a Map widget).
- Geometry and attribute—Allows users to edit the geometries and attributes for features in the data sources from the specified Map widget. You can click the Import all button to add all the map's editable layers or click New editable layer to choose specific layers.
- Layer configuration—Select the data source to be edited. For each layer, specify the following settings:
- Label—Type a name for the data source. This name appears in the widget to differentiate records from different sources.
- Capability—Specify the edit capabilities for the data source.
-
Configure fields—Choose a method for how fields appear in the widget.
- Use webmap settings—Displays all editable fields or a form configured in the map (including conditional visibility settings).
- Customize—Displays the editable fields that you select. (The first 50 fields are automatically selected; click Clear selection to deselect all.) In the subset of selected fields, specify which fields you want users to edit. Organize them by dragging to reorder or combining fields into logical groups. Provide descriptions for each field or group to give context or instructions.
- Snapping settings—Choose to include the Geometry guides and Feature to feature snapping tools.
- Choose a mode for the snapping tools.
- Prescriptive mode—Set predefined snapping settings that are unchangeable at run time.
- Flexible mode—Set default snapping settings that the user can change at run time.
- Enable by default—Enable the snapping tool by default when the widget loads. This check box appears under each snapping tool when you choose to include either of the tools in Flexible mode.
- Choose default snapping layers—Designate layers as snapping layers by default when the widget loads.
- Choose a mode for the snapping tools.