﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
29137	ModelForm, Generic Views and Generic Edit Views Custom Layout Simplification	Spleeding1	nobody	"I'm trying to make a customer form linked to a database(ModelForm) that on the screen would look like:
{{{
<fieldset name> Customer Information </fieldset name>(not actual html)
First_Name  Last_Name  MI
Address_1
Address_2
City  State  Zip_Code
}}}
These forms currently give you these html options: as ""paragraph"", as ""list"", as ""table"", which don't fit my layout. The text input boxes are also all the same size. To manually render the template requires a lot of html coding, adding labels etc.

The (admin.ModelAdmin) ""fieldsets"" already does this in the admin site. Is there a way of implementing this in these views?
Some options to consider: (ModelForm example)
{{{
class CustomerForm(ModelForm):
    class Meta:
        model = Customer
        fieldsets = [
            ('Name and Address', {'fields' : [ ('first_name', 'last_name', 'mi'),
                                                                     'address_1',
                                                                     'address_2',
                                                                    ('city', 'state', 'zip_code')
                                                                  ]
                                                    }
            )
           ('Phone and Email', {'fields' : [ #(etc...)
}}}
And be able to customize:
""  'classes' : "" or you could give it a css or javascript class and  put it in your static file:
{{{
('Name and Address', {'fields' ('class' : ['name_field'], 'classes' : ['collapse'] ): [ ('first_name', (etc...)
}}}
And finally, make text input boxes the same ""size"" as the ""max_length="" setting for the form or model.

Maybe there is an easy way to do all of this and I just couldn't find it in the documentation. If so, please let me know, and sorry."	Cleanup/optimization	closed	Forms	2.0	Normal	wontfix			Unreviewed	0	0	0	0	0	0
