function _form_test_tableselect_form_builder

7.x form_test.module _form_test_tableselect_form_builder($form, $form_state, $element_properties)

Build a form to test the tableselect element.

Parameters

$form_state: The form_state

$element_properties: An array of element properties for the tableselect element.

Return value

A form with a tableselect element and a submit button.

4 calls to _form_test_tableselect_form_builder()
_form_test_tableselect_empty_form in drupal-7.x/modules/simpletest/tests/form_test.module
Test functionality of the tableselect #empty property.
_form_test_tableselect_js_select_form in drupal-7.x/modules/simpletest/tests/form_test.module
Test functionality of the tableselect #js_select property.
_form_test_tableselect_multiple_false_form in drupal-7.x/modules/simpletest/tests/form_test.module
Test the tableselect #multiple = FALSE functionality.
_form_test_tableselect_multiple_true_form in drupal-7.x/modules/simpletest/tests/form_test.module
Test the tableselect #multiple = TRUE functionality.

File

drupal-7.x/modules/simpletest/tests/form_test.module, line 571
Helper module for the form API tests.

Code

function _form_test_tableselect_form_builder($form, $form_state, $element_properties) {
  list($header, $options) = _form_test_tableselect_get_data();

  $form['tableselect'] = $element_properties;

  $form['tableselect'] += array(
    '#type' => 'tableselect',
    '#header' => $header,
    '#options' => $options,
    '#multiple' => FALSE,
    '#empty' => t('Empty text.'),
  );

  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Submit'),
  );

  return $form;
}