You are here

function name_content_is_empty in Name Field 6

Implementation of hook_content_is_empty().

2 calls to name_content_is_empty()
name_element_validate in ./name.module
name_field in ./name.module
Implementation of hook_field().

File

./name.module, line 817
Defines an API for displaying and inputing names.

Code

function name_content_is_empty($item, $field) {
  foreach (_name_translations() as $key => $title) {

    // Title has no meaning by itself.
    if ($key == 'title' || $key == 'generational') {
      continue;
    }
    if (!empty($item[$key])) {
      return FALSE;
    }
  }
  return TRUE;
}