Whats the best way to dynamically add NEW dhtml content to a form that's generated via Zend_Form. Example, say the form is created like so:
class formUser extends Zend_Form {
public function __construct( $options = null ) {
parent::__construct( $options );
$page1 = new Zend_Form_Element_Text( 'page1' );
$page1->setLabel( 'Page 1' );
$submit = new Zend_Form_Element_Submit( 'submit' );
$this->addElements( array( $page1, $submit ) );
}
}
Here the form creates ONE and only ONE element called "page1," but what if I wanted to throw in an "Add" button in the view that would dynamically generate more elements, like page2, page3, page4, etc, while integrating it with Zend_Form ?
Here is the effect I'm talking about
This isn't me, but he's got the same question and maybe worded it better
In my case, its actually a children and parent relationships. Around this area, a person could have 0 or 15 kids and I wouldn't raise an eyebrow.
Thanks!