v0.11.0
See the Upgrade Guide for instructions on upgrading to this release from the previous version.
Breaking Changes
- Renamed BaseFormtoForm, changing the top-level API - this has the same
 behaviour as the currently-exportedforms.Form.
- Renamed BaseFormSettoFormSet, changing the top-level API.
- Replaced util.formData()with the
 get-form-data module -
 formData()has been renamed togetFormData().
- Newforms is now published to npm as flattened, top-level modules, so
 individual modules (such asForm,FormSet, fields, widgets, React
 components,ValidationError...) can be required with
 require('newforms/<modulename>')- this makes it possible to reduce the size
 of your own browser bundles by requiring only what you use.
New Features
- Added new core Fieldargument:field.widgetAttrs- this allows you to
 provide additional widget attributes without having to redefine the entire
 widget (docs) (#62)
- Added Form.prototype.prefixFormat('{prefix}-{name}') and
 FormSet.prototype.prefixFormat('{prefix}-{index}') to define how prefixes
 are generated. These can be overridden when extending these components to
 customise now field names are generated when prefixes are used
 (example) (#70)
Changes
- Added former formsetFactory()options toFormSetproper (API docs)- FormSetcan now be constructed directly, setting all formset-specific options for the instance instead of having to extend it,
- FormSet.extend()can now be used directly to preconfigure a- FormSet
 constructor with the- Formconstructor to be used and any other formset
 options.
 
- FormSetoptions can now be overridden when constructing a- FormSet.
- An error will now be thrown if a FormSetis constructed without aForm
 constructor.
- FileFieldcleaned data is now a native- Fileobject, when the browser
 supports it (docs) (#61)- Added a multipleargument forFileField- cleaned data will be a list of
 Fileobjects.
- Filename length and empty file validation can now be performed on the client
 when aFileobject is available.
 
- Added a 
- Widget attribute defaults are now always provided by numeric fields when not
 already set, regardless of the type of widget being used, to allow custom
 widgets which don't extendNumberInputto make use of them
 (#59)
Bug Fixes
- DecimalFieldnow handles all-zero inputs correctly - it was cleaning them
 to an empty string (#57)
- Selectwidgets no longer generate React dev-mode warnings about unique key
 props (#68)
Deprecations
- formsetFactory()is deprecated in favour of using- FormSet.extend()to
 create a FormSet with defaults for the same options and any custom methods
 required.
Removals
- Removed deprecated Formrendering methods (render(),asTable(),asDiv()
 andasUl()).
- Removed deprecated FormSetrendering methods (render(),asTable()and
 asDiv()).