Mantis
Mantis

Reputation: 1387

django crispy forms: form field in template

Is it at all possible to render a forms field independently, for example {{form.firstname}}. If i use {{form|crispy}} it renders like {{form.as_p}}.

Upvotes: 0

Views: 1162

Answers (1)

Alasdair
Alasdair

Reputation: 308779

You can use the as_crispy_field filter

{% load crispy_forms_tags %}
{{ form.field|as_crispy_field }}

Upvotes: 1

Related Questions