Try moving your int validator into the CheckBoxList instantiation. It
will look something like this:

class MyMacroFilterFormValidator(validators.Schema):
    macro = validators.String(not_empty=False, if_empty=''),
    designer = validators.String(not_empty=False, if_empty=''),

class MyMacroFilterFormField(CompoundFormField):
    member_widgets = [ "macro","status", "designer"]
    template = """
<div xmlns:py="http://purl.org/kid/ns#";>
  <table border="1">
     <tr>
       <th>Macro Name</th>
       <th>Status</th>
       <th>Designer</th>
    </tr>
       <tr>
       <td>${display_field_for(macro)}</td>
       <td>${display_field_for(status)}</td>
       <td>${display_field_for(designer)}</td>
    </tr>
   </table>
</div>
    """
    def __init__(self, m_params={}, s_params={}, d_params={}, *args,
**kw):
        super(MyMacroFilterFormField,self).__init__(*args,**kw)
        self.macro = TextField("macro",
                                **m_params)
        self.status = CheckBoxList("status",
                                   options = [(0,'zero'),
(1,'one'),(2,'two')],
                                   validator=validators.Int(),
                                   **s_params)
        self.designer = TextField("designer",
                                  **d_params)


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

Reply via email to