Managing user progression through a form with JQuery
I have a very long horizontal form that is separated into multiple sub-forms, acting as slides.
Only one slide is visible at any given time, however they each have a button that allows going on to the next section, without actually submitting the form. I also would like 开发者_Go百科the user to be able to navigate back so I added buttons that let the user go back and forward. I use the JQuery validate plugin to validate user input.
How do I prevent the user from navigating through the form if the information is in an incorrect state?
If you are using the jqQuery validate plugin you can accomplish exactly this, just read up the docs, use the valid() function to check the elements in the currently shown sub form.
精彩评论