Embarking on my first ajaxified Zend Form with a JQuery UI-tabbed interface,
I am wondering what sort of practices people recommend.

Say we have tabs 1, 2 and 3, left to right. Tab 1 is displayed first. They
click tab 2. We use a JQuery tabsselect callback to submit only the data
from tab 1 for validation. So... in the controller I presume we should call
$form->processAjax(...) to validate the $_POSTed data, yes?

Back to the client side, the JQuery callback displays errors and returns
false if there are any errors, otherwise true and the next tab is displayed.
Right?

When they finally click the submit button, do we xhr-submit all the data
from all the tabs and fields, and validate it all once again? It seems
redundant if you do, but risky if you don't.

OTOH, with each click on the next tab, you could actually save the
successfully validated data from the current tab (in this case, in a
database) and carry on. That would obviate the need for re-validating. Then
again, as a user I don't expect to save until I actually click a submit
button rather than a tab.

Comments?

-- 
Support real health care reform:
http://phimg.org/

--
David Mintz
http://davidmintz.org/

Reply via email to