I'm working with Zend Form and I need to dynamically (when filling out the form by user) add groups of elements. For example I have form with few fields describing offer and one subform to set offer price. But offer can have more than one price and price is not only 1 element, its composed of
- offer regular price
- offer discount price
- offer items count
So there are 3 different elements in one gruop.
I can create elements with javascript but when should I add them to Zend Form Object?