2009年3月26日星期四

Re: [fw-mvc] form->getValues and file upload

On Thu, Mar 26, 2009 at 4:59 PM, Abraham Block <atblock@gmail.com> wrote:
> Why would you need to do getValues more than once?

Sorry, that's not what I meant. Let me put it this way...

When you request the value of something, if that's your only intent,
shouldn't the value of the source remain unchanged in the process?
For example, $object->getName() should just return the Name and not
change the value of Name in the process. Or, in this case, if you
request values for the elements of a form, would you expect to change
the values of those elements in the process?

It seems like the change in value, the tmp files being removed, is
unexpected when I'm calling $form->getValues. What do you think?

Also, if you're working with form file elements, don't you have to
make sure that you process the uploaded files before calling something
like $object->saveEntry($form->getValues())? (or you have to use
$form->getValue('property') )

-Ed

没有评论: