function webform_admin_settings_submit in Webform 6.3
Same name and namespace in other branches
- 7.4 includes/webform.admin.inc \webform_admin_settings_submit()
- 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/settings/webform.
File
- includes/
webform.admin.inc, line 175 - 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']);
// Change the name of the node type variable and clean it up.
$form_state['values']['webform_node_types'] = array_keys(array_filter($form_state['values']['node_types']));
unset($form_state['values']['node_types']);
}