Function updateAttributeFormElements

  • JMap.Form.updateAttributeFormElements

    Updates an attribute form element.

    Works only for attribute form.

    Parameters

    Returns Promise<JFormResult[]>

    Throws

    if layer not found, if form not found, or form is not an attribute form, or invalid parameter

    Example

    // 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))