templatetags Package

templatetags Package

form_helper Module

kawaz.core.forms.templatetags.form_helper.get_form_helper(type='horizontal')[ソース]

<type>に応じたFormHelperを返します。 もし、該当する<type>が見つからない場合は、TemplateSyntaxErrorを投げます。

Syntax:
{% get_form_helper as <variable> %} {% get_form_helper <type> as <variable> %}
Type: (Default: horizontal)
horizontal: Bootstrap3のHorizontal Formを描画するHelper inline: Bootstrap3Inline Formを描画するHelper bare: horizontalを描画し、formタグに囲まれていないHelper

Examples

任意のFormに対してHorizontalFormHelperを適応する {% load crispy_form_tags %} {% load form_helper %}

{% get_form_helper “horizontal” as helper %} {% crispy form helper %}