ZF-5613: Allow subforms to be initialized at Zend_Form instantiation with config
It would be a great and simple additional feature to allow subforms to be part of the Zend_Form instantiation using a config. Currently, they are "forbidden" in the Zend_Form file. I would imagine a simple loop adding new Zend_Form_SubForm would do it. Currently, I do use configs like the following, but I have a simple loop through it to add the subforms to my form in my controller.
$form_config = array( 'attribs' => array( 'name' => 'form_name' ), 'subForms' => array( 'subform1' => array( 'elements' => array( 'test1' => array('Text', array( 'label' => 'Test1' )) ), 'order' => 2 ), 'subform2' => array( 'elements' => array( 'test2' => array('Text', array( 'label' => 'Test2' )) ), 'order' => 1 ) ) );