@view_config(renderer="templates/form.pt", name="checkedinput")
@demonstrate("Checked Input Widget")
def checkedinput(self):
widget = deform.widget.CheckedInputWidget(
subject="Email", confirm_subject="Confirm Email"
)
class Schema(colander.Schema):
email = colander.SchemaNode(
colander.String(),
title="Email Address",
description="Type your email address and confirm it",
validator=colander.Email(),
widget=widget,
)
schema = Schema()
form = deform.Form(schema, buttons=("submit",))
return self.render_form(form)