End result is I duplicated the code form the CheckboxSelectMultiple
and made my own.  Only difference is that I test for for an option
value and don't append to the form if there isn't one

if option_value:
   ...
    output.append(u'<li><label%s>%s %s</label></li>' % (label_for,
rendered_cb, option_label))

Vance


On Sat, Sep 20, 2008 at 2:04 PM, Vance Dubberly <[EMAIL PROTECTED]> wrote:
> Unfortunately no luck
>
> locations = forms.ModelChoiceField(Location.objects.all(),
> widget=forms.CheckboxSelectMultiple(), initial='')
> locations = forms.ModelChoiceField(Location.objects.all(),
> widget=forms.CheckboxSelectMultiple(), initial=None)
>
> no impact.
>
> Vance
>
>
>
> On Fri, Sep 19, 2008 at 9:03 PM, Joshua Jonah <[EMAIL PROTECTED]> wrote:
>>
>> ... use the 'initial' attribute of the form field.
>>
>> Vance Dubberly wrote:
>>> So with a form that does this:
>>> forms.ModelChoiceField(TransportMethod.objects.all(),
>>> widget=forms.CheckboxSelectMultiple())
>>>
>>> The first check box has no value and is labeled '---------'  is there
>>> an option to have that not exist.  I don't don't see a passable param
>>> which would turn it off in either ModelChoiceField or
>>> CheckboxSelectMultiple. Am I blind?
>>>
>>> Vance
>>>
>>>
>>
>>
>> >>
>>
>
>
>
> --
> To pretend, I actually do the thing: I have therefore only pretended to 
> pretend.
>  - Jacques Derrida
>



-- 
To pretend, I actually do the thing: I have therefore only pretended to pretend.
 - Jacques Derrida

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to