1 ajax_test.module ajax_test_dialog_form($form, &$form_state)

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

File

core/modules/simpletest/tests/ajax_test.module, line 141
Helper module for Ajax framework tests.

Code

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