You are here

function fc_default_field_is_complete in Field Complete 7

Simply use the default 'empty' hook to see if each entry has content

1 string reference to 'fc_default_field_is_complete'
default.inc in plugins/fields/default.inc

File

plugins/fields/default.inc, line 18

Code

function fc_default_field_is_complete($items, $instance, $field, &$completed = array()) {
  $module = $field['module'];
  $zero_as_empty = !empty($instance['settings']['fc']['fc_check_zero']);
  foreach ($items as $delta => $item) {
    if (isset($item['value']) && $item['value'] === '0' && $zero_as_empty) {
      $item['value'] = '';
    }
    $completed[$delta] = !module_invoke($module, 'field_is_empty', $item, $field);
  }
}