本文简要介绍 python 语言中 arcgis.mapping.forms.FormGroupElement
的用法。
用法:
class arcgis.mapping.forms.FormGroupElement(form=None, elements=None, initial_state=None, description=None, label=None, visibility_expression=None, **kwargs)
基础:
arcgis.mapping.forms.FormElement
表示表单中的单个组元素。这是 FormElement 的子类,因此您也可以修改这些对象的属性,例如标签、说明和visibility_expression。
更多请看:https://developers.arcgis.com/web-map-specification/objects/formGroupElement/
Parameter
Description
form
可选
FormInfo
。包含该组元素的表单。description
可选
str
。组元素的说明label
可选
str
。组元素的标签visibility_expression
可选
FormExpressionInfo
。条件可见性 Arcade 表达式确定数据收集期间表单元素的可见性initial_state
可选
dict
。选项有“collapsed”和“expanded”例子:
# USAGE EXAMPLE 1: Edit properties on group, add to group from arcgis.mapping.forms import FormExpressionInfo wm = arcgis.mapping.WebMap(item) wm.add_layer(manhole_inspection) form_collection = wm.forms form_info = form_collection.get_form(title="Manhole Inspection") # edit group properties, access elements within group group_element = form_info.get(label="Group 1") grouped_form_element = group_element.get(label="Inspector Name") grouped_form_element.label = "Inspector Name(s) group_element.label = "Inspector Information" group_element.initial_state = "collapsed" # add group, add to group, delete from group, delete group new_group = FormGroupElement(form_info, label="Group 2", initial_state="expanded") group = form_info.add(element=new_group) grouped_element = group.add_field(field_name="inspection_date", label="Inspection Date") group.add_field(field_name="inspection_city", label="Inspection City") grouped_element.label = "Inspection Date" group.move(grouped_element, index=1) group.delete(grouped_element) form_info.delete(group)
相关用法
- Python ArcGIS FormFieldElement用法及代码示例
- Python ArcGIS FormCollection用法及代码示例
- Python ArcGIS FormInfo用法及代码示例
- Python ArcGIS FeatureLayerCollection.extract_changes用法及代码示例
- Python ArcGIS FeatureLayer.manager用法及代码示例
- Python ArcGIS FeatureLayer.delete_features用法及代码示例
- Python ArcGIS FeatureLayer.fromitem用法及代码示例
- Python ArcGIS Feature.geometry用法及代码示例
- Python ArcGIS FeatureLayer.query_related_records用法及代码示例
- Python ArcGIS FeatureLayer用法及代码示例
- Python ArcGIS FeatureLayer.query_date_bins用法及代码示例
- Python ArcGIS Feed.metrics用法及代码示例
- Python ArcGIS FeedsManager.get用法及代码示例
- Python ArcGIS FeatureLayer.get_unique_values用法及代码示例
- Python ArcGIS FeatureLayer.generate_renderer用法及代码示例
- Python ArcGIS FeatureLayer.append用法及代码示例
- Python ArcGIS FeatureLayer.calculate用法及代码示例
- Python ArcGIS Feature.set_value用法及代码示例
- Python ArcGIS FeatureCollection.from_featureset用法及代码示例
- Python ArcGIS FeedsManager.create用法及代码示例
- Python ArcGIS FeedsManager.items用法及代码示例
- Python ArcGIS FeatureLayer.edit_features用法及代码示例
- Python ArcGIS FLOAT用法及代码示例
- Python ArcGIS Feature用法及代码示例
- Python ArcGIS Feature.attributes用法及代码示例
注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 arcgis.mapping.forms.FormGroupElement。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。