I have a form in on of my Drupal page that uses Multiupload Filefield Widget to upload multiple images at once.

I want to alter the functionality of this Multiupload Filefield Widget from my custom module using hook_form_alter.

At first I thought It will be a managed_file widget. But it is not.

Is there a way to do it?

  • Did you try hook_form_alter to check multiupload filefield widget? Oct 30 '13 at 4:39
  • @JayendraKainthola: No. How to do that?
    – kmdhrm
    Oct 30 '13 at 5:09
  • ,how are you rendering the form in page? Oct 30 '13 at 5:14
  • For future: in hook_form_alter you can simply dpr($form) or var_dump($form) and see what's what ;)
    – Mołot
    Oct 30 '13 at 9:11

Yes it does, as defined in multiupload_filefield_widget_element_info(). The element type is mfw_managed_file, so you can use something like:

$form['multi_upload_element'] = array(
  '#type' => 'mfw_managed_file',
  '#title' => t('Some file'),
  '#upload_location' => 'public://',

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.