From b94a90c47d099acb4e90d97ebcc72e4a2c91b2f0 Mon Sep 17 00:00:00 2001
From: dagmar <dagmar@154086.no-reply.drupal.org>
Date: Mon, 25 Apr 2016 13:41:32 +0000
Subject: [PATCH] Issue #2712965 by dagmar: Use the selected contact form as
 default option when creating blocks

---
 src/Plugin/Block/ContactBlock.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/Plugin/Block/ContactBlock.php b/src/Plugin/Block/ContactBlock.php
index 959b66f..e5433e2 100644
--- a/src/Plugin/Block/ContactBlock.php
+++ b/src/Plugin/Block/ContactBlock.php
@@ -139,9 +139,10 @@ class ContactBlock extends BlockBase implements ContainerFactoryPluginInterface
    * {@inheritdoc}
    */
   public function defaultConfiguration() {
+    $default_form = \Drupal::config('contact.settings')->get('default_form');
     return array(
       'label' => t('Contact block'),
-      'contact_form' => 'personal',
+      'contact_form' => $default_form,
     );
   }
 
-- 
1.9.1

