We have a number of pages in the administration UI today that make use
of subforms, which are forms dynamically hidden or shown based on
the selection on another form control. Each one of these had to be
written manually, which made implementations inconsistent and sometimes
This change introduces a new formal subform implementation, which we'll
be able to start using in the settings pages. There are several new
things introduced here:
-is-subform modifier on
rb-c-form-fieldset, which turns a
fieldset into a subform.
Data attributes for specifying a subform group, ID, and a controller
element ID (which is used to automatically manage subform displays).
Guidance on setting both the
hidden attributes to
ensure the form's data won't be validated or sent to the server, and
hiding the form from display and from screen readers (note that
hidden is an HTML 5.1 attribute, which is available in all our
supported browsers, including IE11).
RB.FormView for automatically setting up and managing
subform state based on the data attributes.
Standard templates for representing a form instance as a subform,
and a dictionary of subform IDs to forms as subforms.
Upcoming changes will update other forms to use this, fixing our form
validation issues on Django 1.11.