1 form_test.module form_test_placeholder_test($form, &$form_state)

Builds a form to test the placeholder attribute.

File

core/modules/simpletest/tests/form_test.module, line 1545
Helper module for the Form API tests.

Code

function form_test_placeholder_test($form, &$form_state) {
  foreach (array('textfield', 'textarea', 'url', 'search', 'password', 'tel', 'number') as $type) {
    $form[$type] = array(
      '#type' => $type,
      '#title' => $type,
      '#placeholder' => 'placeholder-text',
    );
  }

  return $form;
}