Skip to main content

Dialog Api

Example: Open Formular in Modal

####Script Example


const dialog$ = fyzUtils.dialogApi.openDynamic("FormModalComponent", {
    componentData: {
        "mode": "reference",
        "title": "",
        "visible": true,
        "initialData": {}, // provide your initial form data
        "formId": "YOUR-FORM-ID"
    }
});

dialog$.result$.subscribe((data) => {
    // Handle your form result when form is closed successfully.
    // Form values are stored in data
})

Form Example

Your form should have a button with following settings to close the modal:

  1. EventBus: Scope
  2. Key: FORM_SUBMITTED