1 field_permission_example.module field_permission_example_field_is_empty($item, $field)

Implements hook_field_is_empty().

hook_field_is_emtpy() is where Backdrop asks us if this field is empty. Return TRUE if it does not contain data, FALSE if it does. This lets the form API flag an error when required fields are empty.

Related topics


modules/examples/field_permission_example/field_permission_example.module, line 194
An example field using the Field Types API.


function field_permission_example_field_is_empty($item, $field) {
  return empty($item['notes']);