List Info

Thread: Zend_Form Display Group Error Messages and Layout




Zend_Form Display Group Error Messages and Layout
user name
2008-05-26 12:05:11
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.nabbl
e.com/Zend_Form-Display-Group-Error-Messages-and-Layout-tp17
475548p17475548.html
Sent from the Zend Framework mailing list archive at
Nabble.com.


Re: Zend_Form Display Group Error Messages and Layout
user name
2008-05-31 00:48:27
As anyone implemented "Birth Date" as a display
group? Please let me know how
you are handling your errors for a group of elements.

Thanks!



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.nabbl
e.com/Zend_Form-Display-Group-Error-Messages-and-Layout-tp17
475548p17572221.html
Sent from the Zend Framework mailing list archive at
Nabble.com.


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )