You are here

function field_collection_hide_blank_items in Field collection 7

Determines if the additional blank items should be displayed or not.

Parameters

array $field: The field info array.

Return value

bool TRUE if the additional blank items should be hidden, and FALSE if not.

2 calls to field_collection_hide_blank_items()
field_collection_field_attach_form in ./field_collection.module
Implements hook_field_attach_form().
field_collection_field_widget_form in ./field_collection.module
Implements hook_field_widget_form().

File

./field_collection.module, line 2169
Module implementing field collection field type.

Code

function field_collection_hide_blank_items($field) {
  return !empty($field['settings']['hide_blank_items']) && $field['cardinality'] == FIELD_CARDINALITY_UNLIMITED;
}