I created a form and wrote all the JQuery for it — form validation etc. Everything works nice but I’d like to learn how I can make this JQuery reusable so I can have more than one form on a page and still have everything work properly. Right now, when I submit one form, the JQuery executes and validates all the forms not just the one I submit.
Thank you!
This will run validation for each individual form on your page.
You can also do this (but I don’t recommend inline Javascript):
Then on each of your forms:
EDIT: If you’re not using the validate plugin, then try this:
Example.