Opened 7 years ago

Closed 6 years ago

#15589 closed New feature (fixed)

form's field.value not documented

Reported by: chris@… Owned by: nobody
Component: Documentation Version: 1.3-beta
Severity: Normal Keywords: Form Field Value
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Section "Looping over the form's fields"

{{ field.value }}
The value of the field.

Example usage:
{% for field in form %}

{% if field.value %}

<p>{{ field.label_tag }}:{{ field.value }}</p>

{% endif %}

{% endfor %}

Change History (6)

comment:1 Changed 7 years ago by Gabriel Hurley

Triage Stage: UnreviewedAccepted

There are in fact several attributes and methods missing from that section about BoundField... value(), css_classes(), etc. There's also no formal definition of BoundField in the docs.

I'd like to see a reference on BoundField added to ref/forms/fields, and then link to that from the topics/forms docs. That'd be better than trying to shoehorn a bunch more material into a topic guide which isn't really about BoundField anyway.

Moreover, the change to the example suggested in the description completely changes the functionality of the example. You'd no longer be rendering a form, you'd be displaying the values. If you were going to illustrate the use of {{ field.value }} in the template there are better ways to go about it.

comment:2 Changed 7 years ago by Luke Plant

Type: New feature

comment:3 Changed 7 years ago by Luke Plant

Severity: Normal

comment:4 Changed 6 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:5 Changed 6 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:6 Changed 6 years ago by Tim Graham

Resolution: fixed
Status: newclosed

Looks like this info has been added since this ticket was created.

Note: See TracTickets for help on using tickets.
Back to Top