views:

396

answers:

2

hey, i'm stuck at a problem which is kind of similar to one that Erik asked about. I'm trying to create a dynamic form in zend and what i wanna do is that there should be a button which when clicked adds a new text box or any form element dynamically.

now the problem is that i'm new to zend framework. i'm using 1.9.7 right now. i've done some functionality like user registration and login etc but dojo and zend subform are completely alien to me. so i need your help. please guide me that where should i start and what would be the logic of this dynamic form.

regards, furqan

A: 

I don't know a lot about zend, but if you want to do that on the client side, you can use dojo.place as described here.

Philippe
A: 

These new elements should be instances of new Zend_Form_Subform to have server side validation working properly.

New subforms may be added via AJAX (see ajaxLink view helper) or to be already present on the page, but hidden with CSS+JavaScript.

takeshin