Thanks Malcolm, I'd over-egged the html pudding
Regards,
Eamon Carron

On Feb 20, 5:18 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Wed, 2008-02-20 at 05:28 -0800,Eamonwrote:
> > Hi All,
>
> > I am a newbie and I can't seem to get my checkbox code working using
> > newforms.
>
> > FORMS.PY
> > class MyForm(forms.Form):
> >     cb = forms.BooleanField(widget=forms.CheckboxInput(),initial=True,
> > required=False)
> >     ...
>
> > VIEWS.PY
> > ...
> >         if request.method == 'POST':
> >             form = MyForm(request.POST)
> >             if form.is_valid():
> >                 bChecked = form.clean_data['cb']
>
> > MYHTML.HTML
> >                 <td><input type="checkbox" name="extras"
> > value="Fulfilled" checked="checked" {{ form.cb }}>Fulfilled
>
> Have a look at the HTML this generates. It won't be anything like what
> you expect. {{form.cb}} is a complete HTML layout section, with a label
> and an input widget and everything. Putting all that markup inside
> another HTML input element is going to lead to tears.
>
> Malcolm
>
> --
> Telepath required. You know where to 
> apply...http://www.pointy-stick.com/blog/- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to