HTML forms template functions

Forms functions support generation and use of HTML forms.


This template functions renders a form hidden <input> containing the CSRF token. You should include this in every <form> you output which uses the POST method.

If this element is not included, the CSRF attack prevention mechanism will reject the user’s request and display an error message.


Render a FormInstance object as a form for the user to fill in.


Render a FormInstance object as a document for the user to view.