I am trying to use this module to upload multiple files into a schemma that I created (in a separated module),


$form['file'] = array (
'#type' => 'dragndrop_upload',
'#title' => 'Test',
'#description' => 'Test',
// This settings allows to drop multiple files at once.
'#attributes' => array (
        'multiupload' => '1',
'cardinality' => '10')

Seems to work great but it seems to ignore the 'multiupload' and the 'cardinality' arguments,

Any idea what am I missing?

  • If the module provides that functionality the property names will have a # in front of them (eg #cardinality) – Clive Oct 14 '14 at 12:01
  • Hi, please note that cardinality is inside an array, shall I put it anyways? – Toni Michel Caubet Oct 14 '14 at 12:10
  • Not sure what you mean - read this it should explain what you need to know – Clive Oct 14 '14 at 12:12
  • Oh right sorry yes I see what you mean now - perhaps not then, depends what the modules documentation says. It's unusual, I would expect those properties to be as # properties in the render array itself, not as attributes on the HTML – Clive Oct 14 '14 at 12:14

It suggests you need this module; from the README file and project page;

Multi-upload support will be enabled if Multiupload Filefield Widget module exists.

| improve this answer | |

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.