Am having 3 pages. On click of each page's next the page will be validating the current page for required field check, numeric check and move to next page. My question is on final save on the 3rd page, can we validate all the 3 pages together as we do for each page.?
2 Answers
Yes, a multipage is no different to a single page from that point of view. If you are using a multipage, then all fields are visible from any of the virtual pages.
Update:
I don't know what you are using to do the validation. All I'm saying that that the multipage DOM is visible from all virtual pages, because you are actually just using one page. jQuery Mobile only shows a part of the bigger page as a virtual page, but you are still using one HTML DOM.
This is probably a hack, but if you have a multipage, then you can let your form span across more than one pages. So the page div's can actually go inside the form. Here I posted a example to show that you can access the elements across your multipage doc: https://stackoverflow.com/a/10686795/828757
-
But on call of validate its validating only the current page, not validating the rest of the page even though the required fields are empty. Can you please tell me just example for doing so. – ASD May 23 '12 at 08:47
-
Am validating the page using jquery.validate. I tried alert the number of elements, it just displaying the count of fields showing in the current page. – ASD May 23 '12 at 10:45
-
Apologies, I'm not using jquery.validate. – Jack May 23 '12 at 10:58