Hi, I think you are looking to override the widget render() method to build multiple HTML form elements? Here is a good example:
http://k0001.wordpress.com/2007/11/15/dual-password-field-with-django/ I have built heaps of these things, usually a choicefield + charfield, charfield + charfield, charfield + datefield etc. Anything where you want to be able to call clean() on multiple form elements because they have some sort of interdependant logic. Also for doing this looking directly at the django source code in forms, fields and widgets is the best way to understand how it works. cheers sam_w On Tue, Jan 4, 2011 at 2:08 AM, Ilian Iliev <[email protected]> wrote: > Two widgets to one field? Can you specify this little bit more? > > On Mon, Jan 3, 2011 at 12:29 PM, robos85 <[email protected]> wrote: >> >> Hi, >> what I want to do, is to add 2 widgets to 1 field. So far I have: >> >> content = >> forms.CharField(widget=forms.Textarea(attrs={'class':'add_editor'}),) >> >> But I also want to add some medi to it (tinymce .js files). How can I do >> that? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to [email protected]. >> 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. > > > > -- > eng. Ilian Iliev > Web Software Developer > > Mobile: +359 88 66 08 400 > Website: http://ilian.i-n-i.org > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to [email protected]. > 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. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. 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.

