You are here

function fieldgroup_display_overview_form_submit in Content Construction Kit (CCK) 5

Same name and namespace in other branches
  1. 6.3 modules/fieldgroup/fieldgroup.module \fieldgroup_display_overview_form_submit()
  2. 6 modules/fieldgroup/fieldgroup.module \fieldgroup_display_overview_form_submit()
  3. 6.2 modules/fieldgroup/fieldgroup.module \fieldgroup_display_overview_form_submit()

File

./fieldgroup.module, line 532
Create field groups for CCK fields.

Code

function fieldgroup_display_overview_form_submit($form_id, $form_values) {
  $type = $form_values['type_name'];
  $groups = fieldgroup_groups($type);
  if (isset($form_values['groups'])) {
    foreach ($form_values['groups'] as $group_name => $groupvalues) {
      $group =& $groups[$group_name];
      foreach ($groupvalues as $key => $value) {
        $group['settings']['display'][$key] = $value;
      }
      fieldgroup_save_group($type, $group);
    }
    cache_clear_all('fieldgroup_data', 'cache_content');
  }
}