system_settings_form_submit

Versions
4.7
system_settings_form_submit($form_id, $values)
5
system_settings_form_submit($form_id, $form_values)
6 – 7
system_settings_form_submit($form, &$form_state)

Execute the system_settings_form.

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

Code

modules/system/system.module, line 2475

<?php
function system_settings_form_submit($form, &$form_state) {
  // Exclude unnecessary elements.
  form_state_values_clean($form_state);

  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.'));

  cache_clear_all();
  drupal_theme_rebuild();
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.