You are here

function editablefields_lazy_render_fields in Editable Fields 7

#pre-render function: render the fallback formatter of a field, but only if it is actually displayed.

1 string reference to 'editablefields_lazy_render_fields'
editablefields_form in ./editablefields.module
Form builder callback.

File

./editablefields.module, line 431
Editable fields module.

Code

function editablefields_lazy_render_fields($element) {
  $element['field'] = call_user_func_array('editablefields_fallback_formatter', $element['#arguments']->arguments);
  if (empty($element['field']) && isset($element['#arguments']->arguments[6]['settings']['empty_text'])) {
    if ($element['#arguments']->arguments[6]['settings']['empty_text'] !== '') {
      $element['field'] = array(
        '#markup' => $element['#arguments']->arguments[6]['settings']['empty_text'],
      );
    }
  }
  return $element;
}