None
@view_config(renderer="templates/form.pt", name="checkboxchoice")
@demonstrate("Checkbox Choice Widget")
def checkboxchoice(self):
choices = (
("habanero", "Habanero"),
("jalapeno", "Jalapeno"),
("chipotle", "Chipotle"),
)
class Schema(colander.Schema):
pepper = colander.SchemaNode(
colander.Set(),
widget=deform.widget.CheckboxChoiceWidget(values=choices),
validator=colander.Length(min=1),
)
schema = Schema()
form = deform.Form(schema, buttons=("submit",))
return self.render_form(form)