Opened 17 years ago

Last modified 17 years ago

#3295 closed enhancement

[patch] newforms: I'd like to have a group functionality in forms — at Version 4

Reported by: ivan Owned by: nobody
Component: Forms Version:
Severity: normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Adrian Holovaty)

I use my custom group fields in my class forms.

I set an attribute in my form class:

 class myform(forms):
     field1 = ...
     field2 = ...
     group_myfields = ['field1','field2']

field1 and field2 are fields sets in my custom form class.

I can retrive html output, writing this:

myform().myfields.as_p()
myform().myfields.as_table()

and retrive only fileds listed in group_myfields.

Change History (6)

by ivan, 17 years ago

Attachment: forms.diff added

comment:1 by ivan, 17 years ago

Summary: I'd like to have a group functionality in forms.[patch] newforms: I'd like to have a group functionality in forms

by Honza Král <Honza.Kral@…>, 17 years ago

Attachment: groups_in_forms.patch added

proper patch format

comment:2 by Honza Král <Honza.Kral@…>, 17 years ago

I just created a patch using svn diff for easier review by others...

The code seems to be working - all tests pass and it doesn't interfere with rest of the code. On the other hand I feel like more work needs to be done on this - its not systematic and rather hackish...

comment:3 by Adrian Holovaty, 17 years ago

Triage Stage: UnreviewedDesign decision needed

I'm not sure whether this functionality is worth adding...

comment:4 by Adrian Holovaty, 17 years ago

Description: modified (diff)

Fixed formatting in description.

Note: See TracTickets for help on using tickets.
Back to Top