Can I add multiple elements in a single DD of Zend Form
I am working on php and now trying to learning Zend, I am trying to collect the age (Year/month) using zend_form. So I want开发者_运维问答 to put 2 text boxes in the same DD wrapper.
Can any one help me please.
Thank you
You could create a composite form element that comprises your two text fields. Then create custom decorator for that element to handle the aggregation. Then add the standard DtDd wrapper.
See this post by MWOP for an example: Creating composite elements
You can't place many input boxes in single element's decorator (with some exceptions like radioboxes or multicheckboxes). Instead that, you must to remove decorator Zend_Form_Decorator_DtDdWrapper
from both elements and place them in new Zend_Form_DisplayGroup
. Then You can set Zend_Form_Decorator_DtDdWrapper
to that DisplayGroup
精彩评论