Phil, I think you must subclass it and define the compress method. See the comments here http://code.djangoproject.com/browser/django/trunk/ django/newforms/fields.py#L412. You will also need a MultiWidget to go with the field.
On Feb 6, 10:04 am, "Phil Powell" <[EMAIL PROTECTED]> wrote: > Hi, > > Can anyone provide any pointers on how I use MultiValueField? Can I > use it straight out of the box, or do I have to subclass to create a > new field and a new MultiValueWidget? > > I thought that this code would just work: > > postcode = forms.MultiValueField(fields=(forms.CharField(max_length=4), > forms.CharField(max_length=4))) > > But all I ever get rendered in my template (using {{ form.postcode }}) > is a single text input. > > Any advice would be much appreciated. > > -Phil --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---