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.
|