diff --git a/src/Plugin/Field/FieldWidget/TemplateWhispererWidget.php b/src/Plugin/Field/FieldWidget/TemplateWhispererWidget.php
index 504cda7..c0ec9b4 100644
--- a/src/Plugin/Field/FieldWidget/TemplateWhispererWidget.php
+++ b/src/Plugin/Field/FieldWidget/TemplateWhispererWidget.php
@@ -90,8 +90,10 @@ class TemplateWhispererWidget extends WidgetBase implements ContainerFactoryPlug
       '#description' => $this->t('Specify a template which will be used to render the content.'),
     ];
 
-    // Put the form element into the form's "advanced" group.
-    $element['#group'] = 'advanced';
+    // Put the form element into the form's "advanced" group if it exists.
+    if (isset($form['advanced']) && $form['advanced']['#type'] === 'vertical_tabs') {
+      $element['#group'] = 'advanced';
+    }
 
     return $element;
   }
