function formdefaults_manage in Form Defaults 7
Same name and namespace in other branches
- 5.3 formdefaults.admin.inc \formdefaults_manage()
- 6.2 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 79 - formdefaults.admin.inc Include for formdefaults administration screen.
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);
$list = array();
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',
'#submit' => array(
'formdefaults_manage_reset_selected',
),
);
return $form;
}