You are here

function dialog_test_dialog_form in Dialog 7.2

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

1 string reference to 'dialog_test_dialog_form'
dialog_test_dialog in tests/dialog_test.module
Menu callback: Renders a form elements and links with #ajax['dialog'].

File

tests/dialog_test.module, line 100
A dummy module for testing dialog related hooks.

Code

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