Greg,

this is due to the fact that there is a known and already solved bug when you use addElement instead of an instance.
I wrote this half a day ago but to send it once again:
--------------
Yes, this issue was added 7 hours ago and have already been fixed in trunk
and branch.
To solve this shortly you can:

* Do not use addElement on the file element... the reason is that getValue()
will be called on the file elements but they have no value and behave false
in such a condition
or
* Add a empty rename filter by setting source and target the same value
----------------

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com


----- Original Message ----- From: "Greg Jones" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, October 15, 2008 12:51 PM
Subject: Re: [fw-general] Form_Decorator_File issues with multiFile


On Wed, 15 Oct 2008 10:54:48 +0100, Thomas Weidner <[EMAIL PROTECTED]> wrote:

Greg,

First:
You should always note the release or revision you are using. ;-)

Sorry, it's 1.6.2. Thanks, what you say makes sense. I'll add a request for the decorator issue and see if it's just me who wants to be able to do that.

I have the form displaying as I want it now, but when it comes to receiving and validating the multifiles, am I meant to do anything special? I'm still exploring, but it seems the only way I can get it to work at the moment is by modifying isValid and receive on Element_File and making them build the array of names to pass to the adapter methods (so if($this->isArray()), loop using $this->_counter and build up an array of $name.'_'.$i values to use in place of $this->getName() as the argument to $adapter->isValid()/$adapter->receive(), in both cases - http://pastie.org/292898 maybe makes this clearer) - if I don't do this, then I get an undefined index 'name' on 1150 of File_Transfer_Adapter_Abstract. Is this a bug or am I doing it wrong?

Greg.

Reply via email to