function mfw_managed_file_process in Multiupload Filefield Widget 7
Process function to expand the mfw_managed_file element type.
Expands the file type to include Upload and Remove buttons, as well as support for a default value.
1 string reference to 'mfw_managed_file_process'
File
- ./
multiupload_filefield_widget.module, line 44
Code
function mfw_managed_file_process($element, &$form_state, &$form) {
$element = file_managed_file_process($element, $form_state, $form);
$element['upload']['#attributes'] = array(
'multiple' => 'multiple',
);
$element['upload']['#name'] .= '[]';
if (!empty($element['upload']['#attached']['js'][0]['data']['file'])) {
$element['upload']['#attached']['js'][0]['data']['mfw'] = $element['upload']['#attached']['js'][0]['data']['file'];
}
unset($element['upload']['#attached']['js'][0]['data']['file']);
return $element;
}