diff options
| author | Sorcha Bowler <saoili@gmail.com> | 2013-10-14 21:16:49 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-10-14 18:41:22 -0400 |
| commit | 018e2c055a894c4869985b0fda64e52a6c368f32 (patch) | |
| tree | 895567422ad65f3069304da5d0369edaebe079c2 | |
| parent | 83b9bfea44e23c5770fa14a8921914839929233b (diff) | |
Fixed #21223 -- Added form.id_for_label to topic guide.
Thanks ebertti at yahoo.com.br for the suggestion.
| -rw-r--r-- | docs/topics/forms/index.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/topics/forms/index.txt b/docs/topics/forms/index.txt index 1039a60d02..70ed4a9c3d 100644 --- a/docs/topics/forms/index.txt +++ b/docs/topics/forms/index.txt @@ -325,6 +325,12 @@ attributes, which can be useful in your templates: <label for="id_email">Email address:</label> +``{{ field.id_for_label }}`` + The ID that will be used for this field (``id_email`` in the example + above). You may want to use this in lieu of ``label_tag`` if you are + constructing the label manually. It's also useful, for example, if you have + some inline JavaScript and want to avoid hardcoding the field's ID. + ``{{ field.value }}`` The value of the field. e.g ``someone@example.com`` |
