On Fri, Aug 27, 2010 at 10:38 AM, David Mintz <[email protected]> wrote:

>
>
> On Fri, Aug 27, 2010 at 10:37 AM, David Mintz <[email protected]>wrote:
>
>> Long story, but I would like to add a form element -- it might as well be
>> ' hidden' -- set its value and manually mark it as valid before calling
>> validate so that this element name/value will be in the $context that a
>> validator requires. I would rather not render this element along with the
>> rest of the form because it's basically none of the end user's business.
>>
>>

Nevermind. Zend_Form for Dummies, Chapter 1: when you say

if ($form->isValid($this->getRequest()->getPost()) {

}

you just populated your $form with $_POST, overwriting any manipulation you
may have done to any element value before that point. So manipulate the
request parameter itself, directly, instead, before validating.

May this help somebody some day and help her or him avoid spending a day on
it.

-- 
Support real health care reform:
http://phimg.org/

--
David Mintz
http://davidmintz.org/

Reply via email to