Martin,
Thank you, that let me delete my extra bunch of code and made me
feel silly for even going there. ;)
Vance
On Sat, Sep 20, 2008 at 4:42 PM, Martin Ostrovsky
<[EMAIL PROTECTED]> wrote:
>
> When creating your widget, you need to set empty_label = None, this
> will supress the ''
When creating your widget, you need to set empty_label = None, this
will supress the '' choice.
Also, I think you want to use forms.ModelMultipleChoiceField in
conjunction with the widget forms.CheckboxSelectMultiple.
On Sep 20, 6:26 pm, "Vance Dubberly" <[EMAIL PROTECTED]> wrote:
> End resu
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'%s %s' % (label_for,
rendered_cb, option_label))
Vance
On Sat
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
... 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
You have to set a default.
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'
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
7 matches
Mail list logo