Hi Jerry,
Read this article

http://zendguru.wordpress.com/2008/12/05/grouping-form-errors-for-display-purpose/

this may help you.


Jerry McG wrote:
> 
> Hi All,
> 
> I am using Zend_Form to implement "Birth Date" on a form. The "Birth Date"
> will be a display group where in "Month," "Day," and "Year" are the select
> elements in the group. All the elements of the display group are displayed
> within a single div, adjacent to one another (similar to Facebook's
> registration form). Only the "Month" element will have a label called
> "Birth Date." Everything works fine except for the fact that validator
> errors screw up the layout of the form. The validator errors for
> individual elements are displayed right after each select element. I would
> like my errors to appear after the display groups div. Can anyone help me
> with this?
> 
> My display group code looks like this:
> 
> // 
> +---------------------------------------------------------------------------+
> //  | Create display group for BIRTH DATE                                     
>                                 |
> // 
> +---------------------------------------------------------------------------+
> $this->addDisplayGroup(array('month', 'day', 'year'), 'dobgroup');
> 
> $dob_group = $this->getDisplayGroup('dobgroup');
> 
> $dob_group->setDecorators(array(  
>       array('FormElements'),  
>       array('HtmlTag', array('tag' => 'div',  
>       'class' => 'ele_hold')),        
> ));
> 
> Thanks!
> 
> Jerry
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Zend_Form-Display-Group-Error-Messages-and-Layout-tp17475548p21483918.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to