django-ajax-forms

  239 downloads
0.3.1 BSD License    
  not rated
Client side JavaScript validation for any Django form

description

download

specifications

django-ajax-forms is a client side JavaScript validation for any Django form.

Simple Examples

A complete example is included in the source repository and includes several samples of the library in use.

A basic example of usage:

{% load ajax_form_utils %}

< form method="post" >
 < table >
 {{ form.as_table }}
 < tr >< td >< /td >< td >< input type="submit" / >< /td >< /tr >
 < /table >
< /form >

< script type="text/javascript" >
 $(function(){
 $('form').validation({% render_ajax_fields form %});
 });
< /script >


With DL rendering:

{% load ajax_form_utils %}

< form method="post" >
 < dl >
 {{ as_dl form }}
 < dd >< /dd >
 < /dl >
< /form >


< script type="text/javascript" >
 $(function(){
 $('form').validation({% render_ajax_fields form %}, {
 layout: 'dl'
 });
 });
< /script >
READ MORE   
Last updated on February 21st, 2012

0 User reviews so far.

SUBMIT