# This is the "<select>"
choices = (('yes','Yes'),
('no', 'No'))
bar = colander.SchemaNode(colander.String(),
widget=deform.widget.SelectWidget(values=choices))
# This is the input that should appear only when the "yes" value is selected
foo = colander.SchemaNode(colander.String())
您可以使用jquery和带有“name”属性的select。 另外,您可以使用jquery“parent()”函数来获取您感兴趣的显示/隐藏输入的容器。在
例如,在模式中执行以下操作:
然后,在模板中添加以下内容:
^{pr2}$相关问题 更多 >
编程相关推荐