You are here

function webform_admin_settings_submit in Webform 7.4

Same name and namespace in other branches
  1. 6.3 includes/webform.admin.inc \webform_admin_settings_submit()
  2. 7.3 includes/webform.admin.inc \webform_admin_settings_submit()

Submit handler for the webform_admin_settings() form.

1 string reference to 'webform_admin_settings_submit'
webform_admin_settings in includes/webform.admin.inc
Menu callback for admin/config/content/webform.

File

includes/webform.admin.inc, line 282
Administration pages provided by Webform module.

Code

function webform_admin_settings_submit($form, &$form_state) {
  $disabled_components = array();
  foreach ($form_state['values']['components'] as $name => $enabled) {
    if (!$enabled) {
      $disabled_components[] = $name;
    }
  }

  // Update $form_state and let system_settings_form_submit() handle saving.
  $form_state['values']['webform_disabled_components'] = $disabled_components;
  unset($form_state['values']['components']);

  // Trim out empty options in the progress bar options.
  $form_state['values']['webform_progressbar_style'] = array_keys(array_filter($form_state['values']['webform_progressbar_style']));
}