THe first problem is solved. The cause: the Captcha element does NOT need the
ViewHelper decorator, because it adds the input text with the value=CaptchaID
Anyway, the TR element doesn't get added:
$this->captcha->setDecorators(
array(
'Captcha',
'Description',
'Errors',
array(array('dataX'=>'HtmlTag'), array('tag' => 'td')),
array('Label', array('tag' => 'td')),
array(array('row2'=>'HtmlTag'),array('tag'=>'tr')),
)
);
Could someone help me?
--- On Sun, 2/14/10, Andrei Iarus <[email protected]> wrote:
From: Andrei Iarus <[email protected]>
Subject: [fw-general] Captcha decorator
To: "Zend Framework" <[email protected]>
Date: Sunday, February 14, 2010, 12:26 AM
Hello to all,
First question: why is ZF Captcha adding 2 input text elements? One contains
already the ID, and the other is empty. One needs to write in both fields the
correct value in order to be validated.
Second question: I am trying to decorate my captcha element simply, as the
other form elements: the label in a TD, the other parts in another TD, and all
this in a tr. I use the same decorators for all form elements:
$this->setElementDecorators(
array(
'ViewHelper',
'Description',
'Errors',
array(array('data'=>'HtmlTag'), array('tag' => 'td')),
array('Label', array('tag' => 'td')),
array(array('row'=>'HtmlTag'),array('tag'=>'tr'))
));
The problem: one of the text input element is not included in the td elements.
Also no TR element is added.
Thanks in advance.