function ds_shared_form_submit in Display Suite 7
Same name and namespace in other branches
- 7.2 modules/ds_ui/includes/ds.fields.inc \ds_shared_form_submit()
Save any field.
1 string reference to 'ds_shared_form_submit'
- ds_shared_form in ./
ds.fields.inc - Shared form for all all fields.
File
- ./
ds.fields.inc, line 215 - Administrative functions for managing custom fields for every entity.
Code
function ds_shared_form_submit($form, &$form_state) {
$field = $form_state['field'];
// Delete previous field configuration.
db_delete('ds_fields')
->condition('field', $field->field)
->execute();
// Save field and clear ds_fields.
drupal_write_record('ds_fields', $field);
cache_clear_all('ds_fields:', 'cache', TRUE);
// Redirect.
$form_state['redirect'] = 'admin/structure/ds/fields';
drupal_set_message(t('The field %field has been saved', array(
'%field' => $field->label,
)));
}