4.7.x system.module system_settings_form_submit($form_id, $values)
5.x system.module system_settings_form_submit($form_id, $form_values)
6.x system.module system_settings_form_submit($form, &$form_state)
7.x system.module system_settings_form_submit($form, &$form_state)

Form submission handler for system_settings_form().

If you want node type configure style handling of your checkboxes, add an array_filter value to your form.

2 calls to system_settings_form_submit()
aggregator_admin_form_submit in modules/aggregator/aggregator.admin.inc
Form submission handler for aggregator_admin_form().
update_settings_submit in modules/update/update.settings.inc
Form submission handler for update_settings().
1 string reference to 'system_settings_form_submit'
system_settings_form in modules/system/system.module
Sets up a form to save information automatically.


modules/system/system.module, line 2820
Configuration system that lets administrators modify the workings of the site.


function system_settings_form_submit($form, &$form_state) {

  // Exclude unnecessary elements.
  foreach ($form_state['values'] as $key => $value) {
    if (is_array($value) && isset($form_state['values']['array_filter'])) {
      $value = array_keys(array_filter($value));
    variable_set($key, $value);
  drupal_set_message(t('The configuration options have been saved.'));


flight9’s picture

In the above code, what does $form_state['values']['array_filter'] use for?
I guess it should be used as 2nd parameter to pass in array_filter($value) , but seems missing.