I have a working django form that submits and the django view handles the form data and stores the data in the database. I would like to change this submission to use AJAX so that it validates one of the fields of the form with the database. There are no good examples out there for AJAX django. The ones that are out there, I have tried and just don’t work. I used this example with prototype https://code.djangoproject.com/wiki/AjaxPrototypeNewForms but this doesn’t post form values and the django is not able to get any form values.
A solid working example would be great.
Please Help!!!
I wrote a couple of form classes, one for regular forms, one for model forms, that return any errors as json. I have a working example of how to use the form, and also how to process the json response back to your page using jQuery. The code is available at: http://djangosnippets.org/snippets/2393/
Hope that helps you out.