No, this is not a hidden field.
I already tried your suggestion with setValue() but it doesn't help.
I was able to trace my problem down to the Zend_Form::isValid() method. For each element, this code
block is executed:
if (!isset($check[$key])) {
$valid = $element->isValid(null, $context) && $valid;
} else {
$valid = $element->isValid($check[$key], $context) && $valid;
$data = $this->_dissolveArrayUnsetKey($data, $belongsTo, $key);
}
As you can see, the element is not validated against its (default) value when the value doesn't
exist in the posted data.
Le 11/08/10 00:42, Hector Virgen a écrit :
Is it a hidden input? Try this to see if it helps:
$form->getElement('nature')->setValue('consignment');
--
Hector Virgen
Sent on my Droid X
On Aug 10, 2010 3:38 PM, "Guillaume ORIOL" <[email protected]
<mailto:[email protected]>> wrote:
The "nature" element is not filled in by the user.
And the setDefault() is called after the element has been added to the form (as
this element is
added in the init() method of the form class).
Le 11/08/10 00:30, Hector Virgen a écrit :
>
> When you view the form on the page, is the "nature" element's value
filled in? Are you calling
>...
>> On Aug 10, 2010 3:17 PM, "Guillaume ORIOL" <[email protected]
<mailto:[email protected]> <mailto:[email protected]
<mailto:[email protected]>>> w...