1.20.x form_test.module form_test_color($form, &$form_state)

Form constructor for testing #type 'color' elements.

See also

form_test_color_submit()

Related topics

File

modules/simpletest/tests/form_test.module, line 1362
Helper module for the form API tests.

Code

function form_test_color($form, &$form_state) {
  $form['color'] = array(
    '#type' => 'color',
    '#title' => 'Color',
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => 'Submit',
  );
  return $form;
}