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

Form constructor for #type html_date, html_time and html_datetime elements.

See also

form_test_h5datetime_submit()

Related topics

File

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

Code

function form_test_h5datetime($form, &$form_state) {
  $form['h5date'] = array(
    '#type' => 'html_date',
    '#title' => 'Date',
    '#description' => 'A date.',
  );
  $form['h5time'] = array(
    '#type' => 'html_time',
    '#title' => 'Time',
    '#description' => 'A time.',
  );
  $form['h5datetime'] = array(
    '#type' => 'html_datetime',
    '#title' => 'Datetime',
    '#description' => 'A date and time combo.',
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => 'Submit',
  );
  return $form;
}