Function openCreationDialogForSubForm

  • JMap.Form.openCreationDialogForSubForm

    Opens the sub form creation dialog.

    Parameters

    • subFormId: JId

      the subform id

    • selectedParentElements: JFormElement[]

      the parent form 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
    .openCreationDialogForSubForm(
    4,
    [
    id: 3,
    attributeValueByName: {
    jmap_id: 3,
    color: "red",
    type: "tree"
    }
    ]
    )
    .then(formMetadata => console.log("Creation sub form dialog opened", formMetadata))
    .catch(error => console.error(error))