You are here

function imagefield_widget_value in ImageField 6.3

Element #value_callback function.

1 string reference to 'imagefield_widget_value'
imagefield_elements in ./imagefield.module
Implementation of hook_elements().

File

./imagefield_widget.inc, line 206
ImageField widget hooks and callbacks.

Code

function imagefield_widget_value($element, $edit = FALSE) {
  $item = filefield_widget_value($element, $edit);
  if ($edit) {
    $item['alt'] = isset($edit['alt']) ? $edit['alt'] : '';
    $item['title'] = isset($edit['title']) ? $edit['title'] : '';
  }
  else {
    $item['alt'] = '';
    $item['title'] = '';
  }
  return $item;
}