The problem I run to is the validation of fields
-
if a field is invalid in tab 1, do not go to any other tabs after it
-
if all fields are good, go to the next tab
-
repeat process
-
the final tab submits the form
the problem is, I have a single form and I divided it into tabs. If I use the jquery validation plugin, it validates the whole form including fields not at tab 1, which invalidates the whole form thus making me stuck at tab 1 despite all fields there being valid.
Any ideas on this one?
you can group controls according to tabs by providing dummy css class attribute like:
now on triggering the tab change, use a function to validate the fields belonging to the field:
PS:- I don’t know what you are using for tabbing. You need to wireup callback function to trigger validation when user clicks on a tab to stop from going to next tab if current one has invalid controls.