Normally when I want to display individual form fields I use:
{{ form.NAMEOFFIELD }}
and if I want to display the entire form I just do:
{{ form }}
But now I’m working on a file where that doesn’t work. The backend developers might not have made the form view specific so the only way I can display it is by doing:
{% render_comment_form for object.video %}
For this form, how can I grab individual field and catch form errors (since it’s not called the usual way)?
Presumably you’re talking about the comments app. As well as
render_comment_form, that app provides aget_comment_formtag:Now the form is available in the
comment_formvariable, and can be iterated in the normal way.