function date_test_sample_form in Date 7.2
Same name and namespace in other branches
- 7.3 tests/date_test/date_test.module \date_test_sample_form()
Form callback. Generates a test form with date elements.
1 string reference to 'date_test_sample_form'
- date_test_menu in tests/
date_test/ date_test.module - Implements hook_menu().
File
- tests/
date_test/ date_test.module, line 26 - Contains date test implementations.
Code
function date_test_sample_form($form, &$form_state) {
$form['date_test_select'] = array(
'#type' => 'date_select',
'#title' => t('Sample from'),
'#date_format' => 'H:i:s a',
'#default_value' => array(
'hour' => 7,
'minute' => 0,
'second' => 0,
'ampm' => 'am',
),
);
return $form;
}