function form_test_validate_required_form_no_title
Form constructor to test the #required property without #title.
1 call to form_test_validate_required_form_no_title()
- FormsTestCase::testRequiredTextfieldNoTitle in modules/
simpletest/ tests/ form.test - Tests validation for required textfield element without title.
1 string reference to 'form_test_validate_required_form_no_title'
- form_test_menu in modules/
simpletest/ tests/ form_test.module - Implements hook_menu().
File
-
modules/
simpletest/ tests/ form_test.module, line 447
Code
function form_test_validate_required_form_no_title($form, &$form_state) {
$form['textfield'] = array(
'#type' => 'textfield',
'#required' => TRUE,
);
$form['actions'] = array(
'#type' => 'actions',
);
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => 'Submit',
);
return $form;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.