function filefield_widget in FileField 5.2
Same name and namespace in other branches
- 5 filefield.module \filefield_widget()
- 6.3 filefield.module \filefield_widget()
- 6.2 filefield.widget.inc \filefield_widget()
Implementation of hook_widget().
File
- ./
filefield.module, line 374 - Defines a file field type.
Code
function filefield_widget($op, $node, $field, &$items) {
$fieldname = $field['field_name'];
switch ($op) {
case 'default value':
return array();
case 'prepare form values':
_filefield_widget_prepare_form_values($node, $field, $items);
break;
case 'form':
return _filefield_widget_form($node, $field, $items);
case 'validate':
_filefield_widget_validate($node, $field, $items);
break;
}
}