should be able to access individual fieldset by name

Issue #3 resolved
Carl Meyer
repo owner created an issue

For more control in laying out forms, it'd be nice to be able to call out individual fieldsets by name: {% for field in form.fieldsets.name %}.

Comments (2)

  1. Carl Meyer reporter
    • changed status to open

    I'd see this happening via a getitem method on FieldsetCollection. This means that the work that currently happens in iter (transforming the list of tuples into actual Fieldset objects) would need to be moved to a private helper method that can be triggered by either iter or getitem, resulting in a SortedDict (probably?) mapping fieldset names to Fieldset objects that would be cached on the FieldsetCollection.

    I don't want that work to happen already in init, because you should be able to poke at the "fieldsets" list-of-tuples attribute as late as possible (in your Form class code) and still have your changes take effect.

  2. Log in to comment