2008年10月28日星期二

Re: [fw-mvc] Multiple upload fields for one form element

No, because files don't have a value. And you don't have an "array" because
all files have the same name. Extending the Multi element would integrate
other problems as file elements behave completly different. We would have to
have the same class two times as we can not extend two classes the same
time. ;-)

If you have had asked if a MultiFile Form-Element would make sense I would
have said it can be discussed.
But for now the file element fit's perfect.

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

----- Original Message -----
From: "Cristian Bichis" <contact@zftutorials.com>
To: <fw-mvc@lists.zend.com>
Sent: Tuesday, October 28, 2008 4:53 PM
Subject: Re: [fw-mvc] Multiple upload fields for one form element


> No problem, Thomas... Problem solved ;)
>
> I have one more question.
>
> Isn't somehow normal to have Zend_Form_Element_File derived from
> Zend_Form_Element_Multi than from Zend_Form_Element_Xhtml ?
>
> Since basically the "value" of this form element is an array actually if
> setMultiFile is set to more than 1 ?
>
> --
> Best regards,
> Cristian Bichis
> www.zftutorials.com | www.zfforums.com | www.zftalk.com | www.zflinks.com
>
>
>
>> I am building the manual my own...so I always have the latest version :-)
>> It is described in the manual which you can get from trunk.
>>
>> Maybe documentation and implementation have crossed some days... because
>> I was said that setMultiFile is also available in 1.6.2. ;-)
>>
>> Greetings
>> Thomas Weidner, I18N Team Leader, Zend Framework
>> http://www.thomasweidner.com
>>
>> ----- Original Message ----- From: "Cristian Bichis"
>> <contact@zftutorials.com>
>> To: <fw-mvc@lists.zend.com>
>> Sent: Tuesday, October 28, 2008 4:42 PM
>> Subject: Re: [fw-mvc] Multiple upload fields for one form element
>>
>>
>>> You searched for */"setMultiFile"/*.
>>>
>>> No results found.
>>>
>>>
>>> Will check on code directly.
>>>
>>> Thanks
>>>
>>> Cristian
>>>
>>>> Did you read the manual ?
>>>> Look at "setMultiFile()".
>>>>
>>>> Note: Does only work on trunk without problems.
>>>>
>>>> Greetings
>>>> Thomas Weidner, I18N Team Leader, Zend Framework
>>>> http://www.thomasweidner.com
>>>>
>>>> ----- Original Message ----- From: "Cristian Bichis"
>>>> <contact@zftutorials.com>
>>>> To: <fw-mvc@lists.zend.com>
>>>> Sent: Tuesday, October 28, 2008 3:43 PM
>>>> Subject: [fw-mvc] Multiple upload fields for one form element
>>>>
>>>>
>>>>> Hello,
>>>>>
>>>>> I am encountering a problem when working with Zend_Form_Element_File.
>>>>>
>>>>> My problem would be that for one file form element i need to upload
>>>>> multiple files. Aka: file[] file[] file[]
>>>>>
>>>>> How do i add all those upload fields to form ? By adding multiple
>>>>> fields eahc with same name as file[] ?
>>>>>
>>>>> --
>>>>> Best regards,
>>>>> Cristian Bichis
>>>>> www.zftutorials.com | www.zfforums.com | www.zftalk.com |
>>>>> www.zflinks.com
>>>>
>>>>
>>>
>>>
>>> --
>>> Best regards,
>>> Cristian Bichis
>>> www.zftutorials.com | www.zfforums.com | www.zftalk.com |
>>> www.zflinks.com
>>>
>>>
>>
>>

没有评论: