• JMap.Form.createDatabaseFormEntry

    Creates an external or sub form entry.

    Works only for external or sub forms.

    Parameters

    Returns Promise<JFormElement>

    Throws

    if layer not found, if form not found, or form is not an external or sub form, or invalid parameter

    Example

    // returns the new created entries
    JMap.Form
    .createDatabaseFormEntry({
    layerId: 3,
    formId: 5,
    parentId: 3,
    parentAttributeValueByName: {
    jmap_id: 3,
    color: "green",
    type: "tree"
    },
    attributeValueByName: {
    name: "bird",
    type: "nest"
    },
    elementId: 3
    })
    .then(entry => console.log("New entry created:", entry))
    .catch(error => console.error("An error occurred while creating new entry", error))