You are here

function filefield_file_upload_value in FileField 6.2

Value callback for 'filefield_upload' form elements. Uploads and validates a file if one has been specified, and returns the fid of that file as result value.

1 string reference to 'filefield_file_upload_value'
filefield_elements in ./filefield.module
Implementation of hook_elements().

File

./filefield.widget.inc, line 148
FileField: Defines a CCK file field type.

Code

function filefield_file_upload_value($element, $edit = FALSE) {
  return empty($element['#value']) ? array(
    'fid' => 0,
    'replaced_file' => $element['#replaced_file'],
  ) : $element['#value'];
}