function system_settings_form

7.x system.module system_settings_form($form)
6.x system.module system_settings_form($form)

Add default buttons to a form and set its prefix.

Parameters

$form: An associative array containing the structure of the form.

Return value

The form structure.

See also

system_settings_form_submit()

Related topics

27 calls to system_settings_form()
aggregator_admin_settings in drupal-6.x/modules/aggregator/aggregator.admin.inc
Form builder; Configure the aggregator system.
blogapi_admin_settings in drupal-6.x/modules/blogapi/blogapi.module
book_admin_settings in drupal-6.x/modules/book/book.admin.inc
Builds and returns the book settings form.
contact_admin_settings in drupal-6.x/modules/contact/contact.admin.inc
dblog_admin_settings in drupal-6.x/modules/dblog/dblog.admin.inc
dblog module settings form.

... See full list

File

drupal-6.x/modules/system/system.module, line 1107
Configuration system that lets administrators modify the workings of the site.

Code

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;
}