Javascript – Multi-page AJAX form with conditional subsections

formsjavascriptjqueryphpzend-framework

I would like to go about creating a multi-page form that changes based on options that are selected on previous pages of the form.

I want to use Zend_Form, and I know JavaScript will be in charge of making the different form fields appear/disappear, but I don't know how the two will work together exactly.

My question is how to get started creating this kind of form with Zend_Form and JavaScript? I am familiar with jQuery, so if there is a jQuery plugin that helps with this, let me know.

Best Solution

I you're going to create a spruced-up multipage form that does all kinds of neat tricks, I would not suggest using Zend_Form, as it will probably just get in your way, but that's just my opinion. I use the Zend Framework, but I never saw the need to use Zend Form, as I like coding everything form related myself.

I would build the form in plain-old HTML, you could use the jQuery tabs plugin to divide the form up into pages in a sleeker way, and the jQuery form plugin to assist with serialization of the form and ajax submission.

There's also the jQuery validation plugin, but I've never tried it out.

Good luck with that.