2

I have a form that is broken down into three different categories: Information, Violations, and Important dates. I need to perform form validation in the information, and Important dates categories(which are the 1st and 3rd tabs, respectively). How can I keep track of which inputs are valid and which aren't so that I can send the user to the right tab to fix errors? I am using Jquery validate plug-in from Jorn Zaefferer. Any help in the right direction would be greatly appreciated.

Thanks

1
  • 1
    This doesn't answer your question, but validating items that are off the screen creates poor usability. You should be validating each "group" or "tab" before the user is allowed to access previous or following ones. Commented Dec 8, 2011 at 21:33

2 Answers 2

1

you can find elements which have errors with jquery, they will be marked by an attribute or class(I can't remember exactly), then you can use the parentUntil function to find the tab and select it.

Sign up to request clarification or add additional context in comments.

Comments

1

In the past I have used a validation panel at the top of each tab, and layout each validation error in a table with two columns: tab and message.

Then the user will know which errors occurred where and navigate between tabs.

If there is only one error you could open the tab directly.

You could use the .first(":parent") function to find the parent element (tab) to decide which tab the control is associated with.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.