You are here

function fieldgroup_content_admin_field_remove_submit in Content Construction Kit (CCK) 6

Same name and namespace in other branches
  1. 5 fieldgroup.module \fieldgroup_content_admin_field_remove_submit()
1 string reference to 'fieldgroup_content_admin_field_remove_submit'
fieldgroup_form_alter in modules/fieldgroup/fieldgroup.module

File

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

Code

function fieldgroup_content_admin_field_remove_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']);
}