None
@view_config(renderer="templates/form.pt", name="select_with_multiple")
@demonstrate("Select Widget (with multiple)")
def select_with_multiple(self):
choices = (
("habanero", "Habanero"),
("jalapeno", "Jalapeno"),
("chipotle", "Chipotle"),
)
class Schema(colander.Schema):
pepper = colander.SchemaNode(
colander.Set(),
widget=deform.widget.SelectWidget(
values=choices, multiple=True
),
)
schema = Schema()
form = deform.Form(schema, buttons=("submit",))
return self.render_form(form)