You are here

function fieldgroup_field_remove_form_submit in Content Construction Kit (CCK) 6.2

Same name and namespace in other branches
  1. 6.3 modules/fieldgroup/fieldgroup.module \fieldgroup_field_remove_form_submit()
1 string reference to 'fieldgroup_field_remove_form_submit'
fieldgroup_form_alter in modules/fieldgroup/fieldgroup.module
Implementation of hook_form_alter()

File

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

Code

function fieldgroup_field_remove_form_submit($form, &$form_state) {
  $form_values = $form_state['values'];

  // TODO:
  // - when a (non last) field is removed from a group, a 'ghost row' remains in the fields overview
  // - when the last field is removed, the group disappears
  // seems to be fixed when emptying the cache.
  db_query("DELETE FROM {" . fieldgroup_fields_tablename() . "} WHERE type_name = '%s' AND field_name = '%s'", $form_values['type_name'], $form_values['field_name']);
}