You are here

function uploadfield_widget in Video 6.4

Same name and namespace in other branches
  1. 6.5 types/uploadfield/uploadfield.module \uploadfield_widget()
  2. 6.3 types/uploadfield/uploadfield.module \uploadfield_widget()

Implementation of hook_widget().

2 string references to 'uploadfield_widget'
uploadfield_filefield_sources_widgets in types/uploadfield/uploadfield.module
filefield source support
video_views_data in views/video.views.inc
Implementation of hook_views_data()

File

types/uploadfield/uploadfield.module, line 91

Code

function uploadfield_widget(&$form, &$form_state, $field, $items, $delta = NULL) {
  $uploadfield = array(
    'data' => array(
      'video_thumb' => '',
      'bypass_autoconversion' => variable_get('video_bypass_conversion', FALSE),
    ),
  );
  $filefield = filefield_widget($form, $form_state, $field, $items, $delta);
  $element = $filefield;
  $element['#default_value'] = array_merge($uploadfield, $filefield['#default_value']);
  $element['#default_value']['data'] = array_merge($uploadfield['data'], $filefield['#default_value']['data']);
  return $element;
}