1 batch_example.module batch_example_simple_form_submit($form, &$form_state)

Submit handler.

Parameters

array $form: Form API form.

array $form_state: Form API form.

Related topics

File

modules/examples/batch_example/batch_example.module, line 83
Hook implementations for the Batch Example module.

Code

function batch_example_simple_form_submit($form, &$form_state) {
  $function = 'batch_example_' . $form_state['values']['batch'];

  // Reset counter for debug information.
  $_SESSION['http_request_count'] = 0;

  // Execute the function named batch_example_1 or batch_example_2.
  $batch = $function();
  batch_set($batch);
}