-- Rohit83 <[EMAIL PROTECTED]> wrote
(on Thursday, 12 June 2008, 02:31 AM -0700):
> I want to know how we display errors in front of element,instead of
> displaying it below that element
Several methods.
If you want to configure it after you've already configured your
element, grab the decorator and set its placement option:
$element->getDecorator('errors')->setOption('placement', 'prepend');
If you want to configure it at the time you're creating the element,
make sure you pass an options array to the decorator with the
'placement' option:
$form->addElement('text', 'foo', array(
'decorators' => array(
'ViewHelper',
array('Errors', array('placement' => 'prepend')),
array('HtmlTag', array('tag' => 'dd')),
array('Label', array('tag' => 'dt')),
),
);
--
Matthew Weier O'Phinney
Software Architect | [EMAIL PROTECTED]
Zend Framework | http://framework.zend.com/