{% extends "foo/base.html" %}

{% block head_title %}Example 4{% endblock %}

{% block body %}
    <h2>Example 4</h2>
    <p>Form with custom fields.</p>

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

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