diff --git a/modules/smart_content_block/src/Plugin/smart_content/Reaction/Block.php b/modules/smart_content_block/src/Plugin/smart_content/Reaction/Block.php index 5ee87f5..3037ac1 100644 --- a/modules/smart_content_block/src/Plugin/smart_content/Reaction/Block.php +++ b/modules/smart_content_block/src/Plugin/smart_content/Reaction/Block.php @@ -5,6 +5,7 @@ namespace Drupal\smart_content_block\Plugin\smart_content\Reaction; use Drupal\Component\Utility\Html; use Drupal\Component\Utility\NestedArray; use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Form\SubformState; use Drupal\smart_content\Reaction\ReactionConfigurableBase; /** @@ -191,10 +192,14 @@ class Block extends ReactionConfigurableBase { * {@inheritdoc} */ public function submitConfigurationForm(array &$form, FormStateInterface $form_state) { - $configuration = [ - 'block_instance' => $form_state->getValue('block_instance'), - ]; - $this->setConfiguration($configuration); + if($this->getBlock()) { + $subform_state = SubformState::createForSubform($form['block_instance'], $form, $form_state); + $this->getBlock()->submitConfigurationForm($form['block_instance'], $subform_state); + $configuration = [ + 'block_instance' => $this->getBlock()->getConfiguration(), + ]; + $this->setConfiguration($configuration); + } } }