You are here

function batch_example_simple_form in Examples for Developers 6

Same name and namespace in other branches
  1. 7 batch_example/batch_example.module \batch_example_simple_form()

Test 1 : Simple form

Related topics

1 string reference to 'batch_example_simple_form'
batch_example_menu in batch_example/batch_example.module
Implementation of hook_menu().

File

batch_example/batch_example.module, line 76
This is an example outlining how a module can define batches.

Code

function batch_example_simple_form() {
  $form['batch'] = array(
    '#type' => 'select',
    '#title' => 'Choose batch',
    '#options' => array(
      'batch_1' => 'batch 1 - load a node 100 times',
      'batch_2' => 'batch 2 - load all nodes, 20 times',
    ),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => 'Go',
  );
  return $form;
}