function contact_form_user_admin_settings_submit
Same name in other branches
- 9 core/modules/contact/contact.module \contact_form_user_admin_settings_submit()
- 10 core/modules/contact/contact.module \contact_form_user_admin_settings_submit()
- 11.x core/modules/contact/contact.module \contact_form_user_admin_settings_submit()
Form submission handler for user_admin_settings().
See also
contact_form_user_admin_settings_alter()
1 string reference to 'contact_form_user_admin_settings_submit'
- contact_form_user_admin_settings_alter in core/
modules/ contact/ contact.module - Implements hook_form_FORM_ID_alter().
File
-
core/
modules/ contact/ contact.module, line 239
Code
function contact_form_user_admin_settings_submit($form, FormStateInterface $form_state) {
\Drupal::configFactory()->getEditable('contact.settings')
->set('user_default_enabled', $form_state->getValue('contact_default_status'))
->save();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.