Skip to content

There is no way to loop over all superform bound fields #15

@kmmbvnr

Description

@kmmbvnr

Composite fields not listed in the form.visible_fields and hidden_fields

Django suggest the form rendering customization by looping over form.hidden_field and form.visible_fields in the template - https://docs.djangoproject.com/ja/1.9/topics/forms/#looping-over-hidden-and-visible-fields. But the bound composite fields is not returned.

It seems it could be fixed but overriding __iter__ method

    def __iter__(self):
        for name in self.fields:
            yield self[name]
       for name in self.composite_fields:
           yield self[name]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions