Index: docs/newforms.txt =================================================================== --- docs/newforms.txt (revision 6635) +++ docs/newforms.txt (working copy) @@ -753,6 +753,28 @@ +Highlighting required fields in templates +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You may wish to show a visitor which fields are required. Here is the above +example modified to insert an asterix after the label of each required field. + +
+ +The ``{% if field.field.required %}*{% endif %}`` part adds the asterix only if +the field is required. Note that "field" is repeated twice because "field" in +the template is a newforms.forms.BoundField instance. + Binding uploaded files to a form --------------------------------