I've created a pretty straight-forward site which loads all of its content via jquery .load()
functions when you click the navigation links, and it works great. What I want now is to load in an email contact form with AJAX-style validation that alert the user about invalid input fields prior to running the php submission.
In other words, user clicks navigation link for "contact me" and a form is loaded into the content div. If the user enters an invalid name or email and hits submit, appropriate error messages will appear next to those input fields. I don't really care what happens after form goes through, whether it be a popup window or redirect page.
I've been trying to figure this out for weeks and I'm ready to give up. The form loads fine, but I can't figure out the basic construct for getting an AJAX loaded form to respond to the user without reloading the page and clearing their fields. I even got the php form submission part working exactly how I want, but getting client-side scripts to function with server-side php functions just seems arduous.
Is this even possible? How should I go about this? What are the basic concepts and tools for something like this?