The buzzword "AJAX" is becoming all the rage these days. While the concept surely isn't new, the method of delivery has changed. A comment by Oguz Demirkapi over on Mark Kruger's "Client Side and Server Side Validation - a case for both" blog post got me thinking about AJAX and qForms. Oguz said:
and we use also Ajax for server side checks. As an example: while registering for our website our Ajax code check whether entered e-mail address has already been in database or not. And than show error msg directly as client side action.
It is a really great option to check availibility etc.
With all the changes I've made to qForms, I figured it would be pretty easy to throw together a little example form that used AJAX techniques to validate a field against live server data. Instead of using a validation method, were instead going to check the value onblur (so that we can then query the server while the user is interacting with the rest of the form) and then we'll display an error is the user has selected a user name that's already being used.
For some examples of what can be done, check out the example below: