function ds_fieldgroup_delete_form_submit in Display Suite 6
Same name and namespace in other branches
- 6.3 includes/ds.groups.inc \ds_fieldgroup_delete_form_submit()
- 6.2 includes/ds.groups.inc \ds_fieldgroup_delete_form_submit()
Delete build mode.
File
- includes/
ds.groups.inc, line 245 - Manage fieldgroups.
Code
function ds_fieldgroup_delete_form_submit($form, &$form_state) {
$module = $form['#module'];
$fields = variable_get($module . '_fields', array());
$fieldgroup = $form_state['values']['fieldgroup'];
$field_title = $fields[$fieldgroup]['title'];
// Save and invalidate fields_cached.
unset($fields[$fieldgroup]);
variable_set($module . '_fields', $fields);
variable_del('ds_fields_cached');
drupal_set_message(t('Fieldgroup %fieldgroup has been deleted.', array(
'%fieldgroup' => $field_title,
)));
$form_state['redirect'] = 'admin/build/ds/' . $form['#module'] . '/fieldgroups';
}