<form method="post" class="{{ form_class }}" id="{{ id }}" action="{{action}}">
    {% if g.ajax %}
        <script type="text/javascript">
        $(function () {
            $('#{{ id }}').yota_activate({ {% if g.piecewise %}piecewise: true{% endif %}
                                        });
        });
        </script>
        {% if g.piecewise %}
            <input type="hidden" name="_piecewise_" value="True"/>
        {% endif %}
        <input type="hidden" name="_ajax_" value="True"/>
    {% endif %}
    {% if hidden %}
        {% for key, val in hidden.iteritems() %}
            <input type="hidden" name="_arg_{{ key }}" value="{{ val }}" />
        {% endfor %}
    {% endif %}
    <div class="alert alert-success"
        {% if not errors %}style="display:none;"{% endif %}
        id="{{ id }}_error">
        {% if errors %}
            {{ errors[0]['message'] }}
        {% endif %}
    </div>
    {% if title %}
    <h2>{{ title }}</h2>
    {% endif %}
