I'm currently modifying an existing module from being able to upload one image to being able to upload two: one for the thumbnail, and one that will pop up whenever they click on the thumbnail. Normally, this wouldn't be a problem for me in PHP, but Magento seems to make this a little more difficult. My problem is this:
I'm creating two upload fields in Form.php:
$fieldset->addField('ngal_large', 'file', array(
'name' => 'large',
'label' => Mage::helper('gallery')->__('Large Image'),
'class' => 'large-image',
'required' => false,
));
And
$fieldset-->addField('ngal_image', 'image', array(
'name' => 'image',
'label' => Mage::helper('gallery')->__('Image'),
'class' => 'required-entry',
'required' => true,
));
The regular image uploads fine, and is inserted into the database. On the other hand, the large image is uploaded, but is never inserted into the database. In the controller, I've added it to the $data array to be inserted, but I must be missing some step in here to get the image name inserted. All the modules I've seen so far have only allowed for one file upload. Is this even possible?
Thanks!