diff --git a/nodeformcols.module b/nodeformcols.module index ffbf054..bd421cd 100644 --- a/nodeformcols.module +++ b/nodeformcols.module @@ -93,7 +93,17 @@ function nodeformcols_form_alter(&$form, $form_state, $form_id) { $placements = nodeformscols_field_placements($form['#node']->type, $variant); foreach ($placements as $key => $p) { if (isset($p['hidden']) && $p['hidden']) { - $form[$key]['#access'] = FALSE; + // If we have elected to hide the "Vertical Tabs", this means we want + // to hide anything in the additional_settings group. + if ($key == 'additional_settings') { + // we have to hide each of the child elements separately, and then + // the group will not get populated. + foreach (element_children($form) as $id) { + if (!empty($form[$id]['#group']) && $form[$id]['#group'] == 'additional_settings') { + $form[$id]['#access'] = FALSE; + } + } + } } } drupal_alter('nodeformcols_post_form', $form);