views:

32

answers:

1

The documentation is a bit lacking with respect to this feature.

from django import forms

class TwoInputWidget(forms.MultiWidget):
    """An example widget which concatenates two text inputs with a space"""
    def __init__(self, attrs=None):
        widgets = [forms.TextInput, forms.TextInput]

I can see I need to create a "widgets" property with a list of other widgets, but after that it gets a little Sherlock Holmes.

Would someone please explain to me how to use the MultiWidget widget?

A: 

Read through this blog entry and the associated Django snippet. Hope this gives you some ideas.

Manoj Govindan
Thanks. The snippet does provide more clues. But it's still detective work. I'm gleaning how to use it by reading the code and seeing the samples. I'm still hoping someone who has already solved this mystery can proffer a little how-to guide for us to consume.
John Mee