1.20.x ajax.inc ajax_command_open_modal_dialog($title, $html, array $dialog_options = array())

Provides an AJAX command to open content in a modal dialog.

The modal dialog differs from the normal modal provided by ajax_command_open_dialog() in that a modal prevents other interactions on the page until the modal has been completed. Backdrop provides a built-in modal for this purpose, so no selector needs to be provided.

See also

ajax_command_open_dialog()

Related topics

File

includes/ajax.inc, line 1385
Functions for use with Backdrop's Ajax framework.

Code

function ajax_command_open_modal_dialog($title, $html, array $dialog_options = array()) {
  $dialog_options['modal'] = TRUE;
  return ajax_command_open_dialog('#backdrop-modal', $title, $html, $dialog_options);
}