Hi
I want to know how to implement the following source code and template
sample they gave within the widget browser.
I reviewed over the checkbox widget, and I think it will be easier
using the widget than creating my own form in my template.
I am assuming this is supposed to go in the controller
class CheckBoxListDesc(CoreWD):
name = "CheckBox List"
for_widget = CheckBoxList("your_checkbox_list",
options=[(1, "Python"),
(2, "Java"),
(3, "Pascal"),
(4, "Ruby")],
default=[1,4])
and this in the template
<ul xmlns:py="http://purl.org/kid/ns#"
class="${field_class}"
id="${field_id}"
py:attrs="list_attrs"
>
<li py:for="value, desc, attrs in options">
<input type="checkbox"
name="${name}"
id="${field_id}_${value}"
value="${value}"
py:attrs="attrs"
/>
<label for="${field_id}_${value}" py:content="desc" />
</li>
</ul>
However I get a traceback error
Traceback (most recent call last):
File "/var/projects/document_site/se/start-se.py", line 27, in ?
from se.controllers import Root
File "/var/projects/document_site/se/se/controllers.py", line 75, in
?
class CheckBoxListDesc(CoreWD):
NameError: name 'CoreWD' is not defined
I need alot of help with this. I've been trying to use checkboxs within
my application but I have had NO SUCCESS. If someone is willing to help
me out it would be greatly appreciated.
Thank you
Stephen
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---