You are here

function fieldgroup_display_overview_form_submit in Content Construction Kit (CCK) 6

Same name and namespace in other branches
  1. 5 fieldgroup.module \fieldgroup_display_overview_form_submit()
  2. 6.3 modules/fieldgroup/fieldgroup.module \fieldgroup_display_overview_form_submit()
  3. 6.2 modules/fieldgroup/fieldgroup.module \fieldgroup_display_overview_form_submit()
1 string reference to 'fieldgroup_display_overview_form_submit'
fieldgroup_form_alter in modules/fieldgroup/fieldgroup.module

File

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

Code

function fieldgroup_display_overview_form_submit($form, &$form_state) {
  $form_values = $form_state['values'];
  $groups = fieldgroup_groups($form['#type_name']);
  foreach ($form_values as $key => $values) {
    if (in_array($key, $form['#groups'])) {
      $group = $groups[$key];

      // We have numeric keys here, so we can't use array_merge.
      $group['settings']['display'] = $values + $group['settings']['display'];
      fieldgroup_save_group($form['#type_name'], $group);
    }
  }
}