2012/8/15 sina miandashti <[email protected]> > hi > > i was reading http://mwop.net/blog/2012-07-02-zf2-beta5-forms.html and > working with that annotation builder in zf2 and doctrine without any > problem > > i wonder if i had a zend form class ... for example class bookForm ... > how can i use this annotation builder inside the class > > for example load basic fields from doctrine entity annotation then add some > extra things (like submit button) inside the bookForm class ... > > in mwop.net example it use within controller ... if I add my extra form > fields in that controller would be too ugly.. > > > please help >
As far as I know, a Form extends the Fieldset class. Therefore, you could create a "master" form yourself, let a builder build another form based on your entity. You set that child form as a fieldset on your master form, where you can add additional elements. -- Jurian Sluiman
