Fixed #16851 - Added how-to access form field value in template; thanks yasar11732 for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Timo Graham 2011-11-21 23:33:39 +00:00
parent 16e3636a1a
commit f2d02647fa
1 changed files with 3 additions and 0 deletions

View File

@ -294,6 +294,9 @@ templates:
The field's label wrapped in the appropriate HTML ``<label>`` tag, The field's label wrapped in the appropriate HTML ``<label>`` tag,
e.g. ``<label for="id_email">Email address</label>`` e.g. ``<label for="id_email">Email address</label>``
``{{ field.value }}``
The value of the field. e.g ``someone@example.com``
``{{ field.html_name }}`` ``{{ field.html_name }}``
The name of the field that will be used in the input element's name The name of the field that will be used in the input element's name
field. This takes the form prefix into account, if it has been set. field. This takes the form prefix into account, if it has been set.