diff --git a/docs/ref/forms/api.txt b/docs/ref/forms/api.txt index 72dfcb67c9..285d43b01c 100644 --- a/docs/ref/forms/api.txt +++ b/docs/ref/forms/api.txt @@ -530,6 +530,16 @@ string or Unicode object, respectively:: >>> unicode(f['subject']) u'' +Form objects define a custom ``__iter__`` method which allows you to loop +through their fields:: + + >>> f = ContactForm() + >>> for field in f: print field + + + + + The field-specific output honors the form object's ``auto_id`` setting:: >>> f = ContactForm(auto_id=False)