diff --git a/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php b/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php index 4c29867..9c697f6 100644 --- a/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php +++ b/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php @@ -552,6 +552,21 @@ class InlineParagraphsWidget extends WidgetBase { if ($item_mode == 'edit') { $display->buildForm($paragraphs_entity, $element['subform'], $form_state); + + if (\Drupal::moduleHandler()->moduleExists('field_group')) { + $context = array( + 'entity_type' => $paragraphs_entity->getEntityTypeId(), + 'bundle' => $paragraphs_entity->bundle(), + 'entity' => $paragraphs_entity, + 'context' => 'form', + 'display_context' => 'form', + 'mode' => $display->getMode(), + ); + + field_group_attach_groups($element['subform'], $context); + $element['subform']['#pre_render'][] = 'field_group_form_pre_render'; + } + foreach (Element::children($element['subform']) as $field) { if ($paragraphs_entity->hasField($field)) { $translatable = $paragraphs_entity->{$field}->getFieldDefinition()->isTranslatable();