params needed to update an element
if layer not found, if form not found, or form is not an attribute form, or invalid parameter
// returns update result
JMap.Form
.updateAttributeFormElements({
layerId: 3,
formId: 4,
elements: [{
id: 3,
attributeValueByName: {
color: "red",
type: "tree"
},
parentAttributeValueByName: {}
}]
})
.then(result => console.log("Element updated:", result))
.catch(error => console.error("An error occurred while updating elements", error))
JMap.Form.updateAttributeFormElements
Updates an attribute form element.
Works only for attribute form.