function form_test_form_state_values_clean_form
Form builder for form_state_values_clean() test.
1 string reference to 'form_test_form_state_values_clean_form'
- form_test_menu in modules/
simpletest/ tests/ form_test.module - Implements hook_menu().
File
-
modules/
simpletest/ tests/ form_test.module, line 1069
Code
function form_test_form_state_values_clean_form($form, &$form_state) {
// Build an example form containing multiple submit and button elements; not
// only on the top-level.
$form = array(
'#tree' => TRUE,
);
$form['foo'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
);
$form['bar'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
);
$form['beer'] = array(
'#type' => 'value',
'#value' => 1000,
);
$form['baz']['foo'] = array(
'#type' => 'button',
'#value' => t('Submit'),
);
$form['baz']['baz'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
);
$form['baz']['beer'] = array(
'#type' => 'value',
'#value' => 2000,
);
return $form;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.