function formdefaults_manage in Form Defaults 6.2
Same name and namespace in other branches
- 5.3 formdefaults.admin.inc \formdefaults_manage()
- 7 formdefaults.admin.inc \formdefaults_manage()
Form management form used for inspecting and resetting forms.
Return value
Form
1 string reference to 'formdefaults_manage'
- formdefaults_menu in ./
formdefaults.module - Implements hook_menu.
File
- ./
formdefaults.admin.inc, line 48
Code
function formdefaults_manage() {
$search_str = $_SESSION['formdefaults_search'];
$form['search_str'] = array(
'#type' => 'textfield',
'#default_value' => $search_str,
'#description' => t('Search all forms that have a formid (name) containing the word you specify.'),
);
$form['search'] = array(
'#type' => 'submit',
'#value' => 'Search',
'#size' => 10,
);
$form['results'] = array(
'#type' => 'fieldset',
'#title' => 'Overridden Forms',
'#tree' => true,
);
$form_list = _formdefaults_search($search_str);
foreach ($form_list as $form_key => $f) {
$list[$form_key] = l($form_key, 'formdefaults/' . $form_key);
}
$form['results']['reset_forms'] = array(
'#type' => 'checkboxes',
'#options' => $list,
);
$form['results']['reset'] = array(
'#type' => 'submit',
'#value' => 'Reset Selected',
);
return $form;
}