Zend_Form submit stops working, when displayed with Display Groups
My Zend_Form has only two elements, text and submit.
When I render the Form as whole, everything works fine.
echo $this->form;
When I render the Form part by part, it gets rendered, but the submit button triggers nothing.
echo $this->form->range;
echo $this->form->submit;
Rendering wiht display groups also leaves the submit butt开发者_如何学Goon dead.
Any ideas?
Thanks in advance!
When you echo form object its magic function __toString() gets called which outputs the html generated by default registered decorators . Which includes "" html tag . Which wraps up all the elements added to the zend from . So if you are echoing individual elements you need to manually wrap elements inside html form tag .
精彩评论