function ajax_test_dialog_form

Form builder: Renders buttons with #ajax['dialog'].

1 string reference to 'ajax_test_dialog_form'
ajax_test_dialog in drupal/core/modules/system/tests/modules/ajax_test/ajax_test.module
Menu callback: Renders a form elements and links with #ajax['dialog'].

File

drupal/core/modules/system/tests/modules/ajax_test/ajax_test.module, line 136
Helper module for Ajax framework tests.

Code

function ajax_test_dialog_form($form, &$form_state) {
  $form['button1'] = array(
    '#type' => 'submit',
    '#value' => 'Button 1 (modal)',
    '#ajax' => array(
      'dialog' => array(
        'modal' => TRUE,
      ),
    ),
  );
  $form['button2'] = array(
    '#type' => 'submit',
    '#value' => 'Button 2 (non-modal)',
    '#ajax' => array(
      'dialog' => array(),
      'wrapper' => 'ajax-test-dialog-wrapper-1',
    ),
  );
  return $form;
}