You are here

function geolocation_content_is_empty in Geolocation Field 6

Implementation of hook_content_is_empty().

CCK has no way to know if something like a zero is an empty value or a valid value, so return TRUE or FALSE to a populated field $item array. CCK uses this to remove empty multi-value elements from forms.

File

./geolocation.module, line 173

Code

function geolocation_content_is_empty($item, $field) {
  if (empty($item['lat'])) {
    return TRUE;
  }
  if (empty($item['lng'])) {
    return TRUE;
  }
  return FALSE;
}