function form_test_html_id in Drupal 7
Builds a simple form to test duplicate HTML IDs.
1 string reference to 'form_test_html_id'
- form_test_double_form in modules/
simpletest/ tests/ form_test.module - Menu callback returns two instances of the same form.
File
- modules/
simpletest/ tests/ form_test.module, line 2007 - Helper module for the form API tests.
Code
function form_test_html_id($form, &$form_state) {
$form['name'] = array(
'#type' => 'textfield',
'#title' => 'name',
'#required' => TRUE,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => 'Save',
);
return $form;
}