eppye, el 21 de febrero a las 12:48 me escribiste:
> 
> i am using TurboGears  1.0.1 (SQLalchemy, kid)
> I am using a widgets.CheckBox like this:
>         mywidget = widgets.CheckBox( )
> Checkboxes are always 'on' by default.
> I am trying to default them to off/False/unchecked.
> >From forms.py:
>         for_widget = CheckBox(name="your_checkbox",
> attrs=dict(checked=True), help_text="Just click me...")
> This does not work.
> Tried several other thing:
>          mywidget =
> widgets.CheckBox(default=False,checked=False,attrs=dict(checked=False,default=False,value=False))
> (etc etc)
> I can not figure out have this works.
> Someone a clue?

How are you displaying the widget? Maybe you are overriding the
value/checked at display time (BTW, you probably don't want to set the
checked value when instantiating the widget, except for the default value,
the most common case is to set the widgets values at display time, because
they are generally calculated dinamically).

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
 .------------------------------------------------------------------------,
  \  GPG: 5F5A8D05 // F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05 /
   '--------------------------------------------------------------------'
There is no such thing as right or wrong
Only consequences

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to