Giorgio,

no value will be returned because file elements do not have a value in HTTP.
Shouldn't you generate ids after you validated the form ?

Btw: When there is no file submitted, why generate an id for it ? :-)

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

----- Original Message ----- From: "Giorgio Sironi" <[EMAIL PROTECTED]>
To: "Zend Framework General" <[email protected]>
Sent: Wednesday, October 15, 2008 1:24 PM
Subject: [fw-general] Zend_File_Transfer


I have to use a file form element that is not required. What happens if the
field is not populated? What value is returned by getValue()? I'd like to
set a default value (the id of file in my table) that is used when the file
is not uploaded, so that if the user does not submit anything during an
editing of an entity, the corresponding file field does not change. I'm
looking at getValue() because it's used by Zend_Form::getValues()  (what I
am calling in my controllers). What validators/methods should I subclass?
Thanks in advance.

--
Giorgio Sironi
Piccolo Principe & Ossigeno Scripter
http://www.sourceforge.net/projects/ossigeno


Reply via email to