diff --git a/src/Form/ModuleConfigurationForm.php b/src/Form/ModuleConfigurationForm.php index 8fe6f3d07cf0f51d1c9ca49257328a391ce40b75..a590abe7dd78cc269180f446bdfbfd6bec3032aa 100644 --- a/src/Form/ModuleConfigurationForm.php +++ b/src/Form/ModuleConfigurationForm.php @@ -31,6 +31,9 @@ class ModuleConfigurationForm extends ConfigFormBase { */ public function buildForm(array $form, FormStateInterface $form_state) { $config = $this->config('wcm8_siteinfo.settings'); + $site_config = $this->config('system.site'); + $site_name = $site_config->get('name'); + $site_mail = $site_config->get('mail'); $form['siteinfo'] = array( '#type' => 'vertical_tabs', @@ -59,7 +62,7 @@ class ModuleConfigurationForm extends ConfigFormBase { '#description' => $this->t('Main name for the site - it should be your college, department or organization name.'), '#size' => '60', '#maxlength' => '75', - '#default_value' => $this->config('system.site')->get('name'), + '#default_value' => $site_name, ); // Contact Information tab @@ -119,7 +122,7 @@ class ModuleConfigurationForm extends ConfigFormBase { '#type' => 'email', '#title' => $this->t('Email'), '#description' => $this->t('Main contact email for your site.'), - '#default_value' => $config->get('email'), + '#default_value' => $site_mail, ); // Social Networking tab