Re: MultiValueField and labels

2008-02-23 Thread Malcolm Tredinnick
On Sat, 2008-02-23 at 21:21 -0800, Zack wrote: [...] > Why doesn't > >>> f = TestPersonForm() > >>> f.as_p() > have labels generated for all the CharFields as defined in > PersonField? Because that's not how MultiWidget works. You can see from the code that the labels on widgets are created by

MultiValueField and labels

2008-02-23 Thread Zack
Hi, If I have these custom field, widget, and form: class PersonField(forms.MultiValueField): def __init__(self, *args, **kwargs): fields = ( forms.CharField(label='Title'), forms.CharField(label='First name'), forms.CharField(label='Middle initial