• JMap.Form.openUpdateDialogForSubForm

    Opens the sub form creation dialog.

    Parameters

    • subFormId: JId

      the subform id

    • subFormElements: JFormElement[]

      the subform's elements

    Returns JFormMetaData

    Throws

    if no form dialog currently opened, or sub form not found, or no sub form table field in currently displayed form, or invalid parameters

    Example

     // opens the form creation dialog for layer id=3
    JMap.Form
    .openUpdateDialogForSubForm(
    4,
    [
    id: 4,
    parentId: 3,
    elementId: 3,
    parentAttributeValueByName: {
    jmap_id: 3,
    color: "red",
    type: "tree"
    },
    attributeValueByName: {
    id: 4,
    name: "bee",
    type: "nest"
    }
    ]
    )
    .then(formMetadata => console.log("Update sub form dialog opened", formMetadata))
    .catch(error => console.error(error))