Login

Snippets by crucialfelix2

Snippet List

tag: render form field

this solves a common problem where you want to specify html tag attributes for form fields in the template itself and not have to do it by writing a custom form class. eg. the size of the field, css classes, tabindex etc. usage: {% render_field form.comments "cols=40,rows=5,class=text,tabindex=2" %} where form.comments is a form field with a text area widget it will show data (if the form is bound or if there is initial data) and will display errors if the field has errors

  • forms
Read More

crucialfelix2 has posted 1 snippet.