I am trying to add a slider to my deform form and I saw that it is possible to create our own widget using plain HTML. I tried the following with no luck. Any hint? Is there some other library that can be used to augment the number of widgets?
class MyInputWidget(Widget):
def serialize(self, field, cstruct=None, readonly=False):
if cstruct is null:
cstruct = u''
quoted = cgi.escape(cstruct, quote='"')
return u'<input id="slider1" type="range" min="0" max="1" step="0.1" value="%s">' % quoted
test = colander.SchemaNode(MyInputWidget())