On Tue, 2009-04-21 at 21:20 +0400, Konstantin S wrote:
> Hello!
> 
> In my model I have dynamically generated checkbox fields that look like this:
> 
> boxes = forms.ModelMultipleChoiceField(queryset=Box.objects.all(),
> widget=forms.CheckboxSelectMultiple)
> 
> The problem is that in the web-interface I've got a long flat list of
> checkboxes and it doesn't look very nice from a design point of view.
> What I want is to split it into two or more columns, but I am not a
> web developer and my knowledge in html and css is very limited. I'd
> try to find a solution for this problem if I were given some hints
> where to start. Please give me such hints.
> 

Write your own widget class to output the required inputs in the manner
you want. Check out how CheckboxSelectMultiple.render() is implemented
in django/forms/widgets.py 

Cheers

Tom


--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to