Skip to main content

Posts

Showing posts from December, 2016

Add multiple file/images in magento custom module

For upload multiple files, first we have to change input type in Abstract.php  go to lib/Varien/Data/Form/Element/Abstract.php look for function and replace  public function getElementHtml()     { if($this->getType()=='file' && $this->getMultiple())         $_multiple = ' multiple'; $html = '<input id="'.$this->getHtmlId().'" name="'.$this->getName()          .'" value="'.$this->getEscapedValue().'" '.$this->serialize($this->getHtmlAttributes()).$_multiple.'/>'."\n"; $html.= $this->getAfterElementHtml(); return $html;     } now open form.php in your module say: app/code/community/module name/namespace/Block/Adminhtml/Libraryfile/Edit/Tab/Form.php add field: $fieldset->addField('file_path', 'file', array( 'label' => Mage::helper('libraryfile')->__('File'), '