By default you cannot do this.
I explained here why is not possible out of the box and how you can make it work.
The explanation is for image inputs but it works the same for image fields.
The idea is that "multiple" is not an allowed attribute for file inputs.
You need to create your won input renderer that extends Varien_Data_Form_Element_File
(or Image
if you need it for images) and make it allow multiple
as attribute.
so your renderer can look like this
<?php
class [Namespace]_[Module]_Block_Adminhtml_[Entity]_Helper_Image extends Varien_Data_Form_Element_Image //or _File if you are not uploading images
{
//make your renderer allow "multiple" attribute
public function getHtmlAttributes(){
return array_merge(parent::getHtmlAttributes(), array('multiple'));
}
}
In your edit form add this:
$fieldset->addType('image', '[Namespace]_[Module]_Block_Adminhtml_[Entity]_Helper_Image');
or if you don't want to upload only images
$fieldset->addType('file', '[Namespace]_[Module]_Block_Adminhtml_[Entity]_Helper_File');
and then add your field like this:
$fieldset->addField(
'id_here',
'image', //or file
array(
'name' => 'image[]', //declare this as array. Otherwise only one image will be uploaded
'multiple' => 'multiple', //declare input as 'multiple'
'label' => Mage::helper('helper_alias')->__('Image'),
'title' => Mage::helper('helper_alias')->__('Image'),
'required' => true,
)
);