function contact_admin_settings in Drupal 4
Same name and namespace in other branches
- 5 modules/contact/contact.module \contact_admin_settings()
- 6 modules/contact/contact.admin.inc \contact_admin_settings()
Settings tab. Using a form rather than hook_settings().
1 string reference to 'contact_admin_settings'
- contact_menu in modules/
contact.module - Implementation of hook_menu().
File
- modules/
contact.module, line 273 - Enables the use of personal and site-wide contact forms.
Code
function contact_admin_settings() {
$form['contact_form_information'] = array(
'#type' => 'textarea',
'#title' => t('Additional information'),
'#default_value' => variable_get('contact_form_information', t('You can leave a message using the contact form below.')),
'#description' => t('Information to show on the <a href="%form">contact page</a>. Can be anything from submission guidelines to your postal address or telephone number.', array(
'%form' => url('contact'),
)),
);
$form['contact_hourly_threshold'] = array(
'#type' => 'select',
'#title' => t('Hourly threshold'),
'#options' => drupal_map_assoc(array(
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
20,
30,
40,
50,
)),
'#default_value' => variable_get('contact_hourly_threshold', 3),
'#description' => t('The maximum number of contact form submissions a user can perform per hour.'),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Save configuration'),
);
$form['reset'] = array(
'#type' => 'submit',
'#value' => t('Reset to defaults'),
);
// Use system_settings_form for the callback.
return drupal_get_form('contact_admin_settings', $form, 'system_settings_form');
}