Greg,
File elements are working in subforms only when you use latest trunk or wait
until 1.6.2 is released.
This feature has been added about 2 weeks ago.
Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com
----- Original Message -----
From: "Greg Jones" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, October 03, 2008 12:15 PM
Subject: [fw-general] File uploads when using Subforms doesn't seem to work
Hi,
I'm trying to get file uploads working, with Zend_Form_Element_File, where
the element sits inside a subform. I've put together a small form that
exhibits the problem, form-code (http://pastie.org/284170) and when I
submit the form, I get the error:
Notice: Undefined index: name in
/var/www/[vhost]/library/Zend/File/Transfer/Adapter/Abstract.php on line
743
and the value for the file element is just '../data/tmp/'.
It seems that while the Transfer_Adapter is preparing the files array and
takes account of the array-indexing used by the subform, when the 'value'
is passed through to do the validation, it's being left out. The contents
of the _files property of the adapter is here (http://pastie.org/284174),
and I can't figure out what's going on past that.
If I add the file-element to the form ($this->addElement() instead of
$sub_form->addElement()), everything works as I'd expect it to - no
Notice, and the value contains a filename, not just folder.
Greg