AJAX multi-page form with conditional subsections

I would like to create a multi-page form that changes depending on the options selected on the previous pages of the form.

I want to use Zend_Form

and I know that JavaScript will be responsible for creating / disappearing different form fields, but I don't know how these two will work together exactly.

My question is, how do I start creating this kind of form using Zend_Form

both JavaScript? I'm familiar with jQuery, so if there is a jQuery plugin that helps with this, let me know.

+1


a source to share


3 answers


I'm going to create a spruced-up multi-page form that does all sorts of neat tricks, I wouldn't suggest using Zend_Form as it probably just bothers you, but that's just my opinion. I am using Zend Framework, but I have never seen the need to use Zend Form as I like to code the whole form associated with itself.

I would build the form in normal HTML, you can use the jQuery tabs plugin to paginate the form in a smoother way, and the jQuery form plugin to help with form serialization and ajax submission.



There is also a jQuery validation plugin , but I have never tried it.

Good luck with that.

+1


a source


If you want to use JavaScript, I highly recommend the jQuery wizard plugin . It supports forking and validation.



+1


a source


I agree with jquery's comments, that if you are familiar with this, I am sure it is a zend connection with jquery.

If we say that if you cannot break the form into several physically different pages, just logically separate them, that is: reload the data in the div (or tabs as indicated by karim), etc. so that you can keep all the information tracked in the form ... If you need to have physically separated pages, you can use sessions to store persistent data.

This might get you started, although I don't know your exact zend setup: http://framework.zend.com/manual/en/zendx.jquery.form.html

0


a source







All Articles