1 field.default.inc field_default_submit($entity_type, $entity, $field, $instance, $langcode, &$items, $form, &$form_state)

Default field 'submit' operation.

Filter out empty values and sort the remainder in preparation for insert, below.

File

core/modules/field/field.default.inc, line 94
Default 'implementations' of hook_field_*(): common field housekeeping.

Code

function field_default_submit($entity_type, $entity, $field, $instance, $langcode, &$items, $form, &$form_state) {
  // Filter out empty values.
  $items = _field_filter_items($field, $items);
  // Reorder items to account for drag-n-drop reordering.
  $items = _field_sort_items($field, $items);
}