system_settings_form
Definition
system_settings_form($form)
modules/system/system.module, line 1031
Description
Add default buttons to a form and set its prefix.
See also
Parameters
$form An associative array containing the structure of the form.
Return value
The form structure.
Related topics
| Name | Description |
|---|---|
| Form builder functions | Functions that build an abstract representation of a HTML form. |
Code
<?php
function system_settings_form($form) {
$form['buttons']['submit'] = array('#type' => 'submit', '#value' => t('Save configuration') );
$form['buttons']['reset'] = array('#type' => 'submit', '#value' => t('Reset to defaults') );
if (!empty($_POST) && form_get_errors()) {
drupal_set_message(t('The settings have not been saved because of the errors.'), 'error');
}
$form['#submit'][] = 'system_settings_form_submit';
$form['#theme'] = 'system_settings_form';
return $form;
}
?> 