Skip to main content

openDialog

openDialog

Opens the given form as a dialog.

Parameters

  • formPath (string): The path or ID of the form to show in the dialog
  • linkArg (any): The argument to pass to the opened form (may be null)
  • callback (function): Callback that receives the result when the dialog closes (may be null)
  • options (object, optional): Dialog options

options entries:

  • width (number): The dialog width in logical pixels
  • barrierColor (string): The background overlay color (for example "#66000000")
  • barrierDismissible (boolean): Whether tapping the background closes it (default false)

Returns: None (void)

openDialog vs openSizedDialog vs openFullDialog

openDialogopenSizedDialogopenFullDialog
SizingWidth only, via optionswidth / height passed directlyFull screen
TransitionDefaultDefaultZoom transition
barrierDismissible defaultfalsefalsetrue (ESC works)

Example

$form.openDialog("dialogs/confirm", { message: "삭제하시겠습니까?" },
function(result) {
if (result?.confirmed) {
$log.i("확인 선택");
}
},
{ width: 400, barrierDismissible: true }
);

Related

  • $form.openFullDialog(formPath, linkArg, callback) — full-screen dialog
  • $form.openSizedDialog(formPath, linkArg, width, height, callback, barrierDismissible) — explicitly sized dialog
  • $form.closeDialog(result) — closes the dialog from inside itself