On Saturday 28 June 2008 19:19:42 krsyoung wrote:
> Hey all,
>
> I believe once again I am making things more difficult than they
> should be.  I'm trying to create a CheckBoxList with a set of actions
> that the user must have performed before submitting the form.  I would
> also like to be able to save their state, so if they haven't finished
> all tasks they can return and simply check off the items remaining.
> Currently I'm trying to use the following widget:
>
> a =
> widgets.CheckBoxList(validator=validators.ForEach(validators.Bool(if_empty=
>False)), label='Do This Stuff:', options=DOSTUFF_CHECKLIST)
>
> However, if a CheckBox is not checked it returns no value, as opposed
> to a False value.  I also tried with StringBool.  The issue is, the
> user can select only item 15 as completed but when I get the list on
> the other side I just have kwargs of a = [True] with no reference to
> the 15 so I can't really store that 15 was completed.
>
> Any ideas out there?

Use different names for the different checkboxes, or use different values for 
each. On road you need to go. Makes validation a bit different though - AFAIK 
there is some subset-kind of validator that you can use to check if all 
values of "a" are amongst a given set.

Diez

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