Field note
What it does
Covers bound and unbound Form instances, validation via is_valid() and errors, BoundField output, and HTML rendering styles.
Capabilities
Available capabilities
Tags
Tags
Ways to use it
Ways to use it
Python / Django
Django's forms API for binding data, validating input, and rendering forms as HTML.
Field note
Covers bound and unbound Form instances, validation via is_valid() and errors, BoundField output, and HTML rendering styles.
Capabilities
Tags
Ways to use it
Python / Django
Product features
Form instances are either bound to data or unbound; is_bound distinguishes them at runtime.
Access form fields and their attributes and methods for granular output control.
Implement clean() on a Form to add custom validation for interdependent fields.
Dictionary of field names to lists of error messages; also supports as_data() and as_json().
Runs validation on a bound form and returns a boolean indicating whether the data is valid.
Render forms via as_div(), as_p(), as_ul(), and as_table().