【发布时间】:2014-09-24 17:50:45
【问题描述】:
我目前正在使用这样的 MultiCheckboxField:
class MultiCheckboxField(SelectMultipleField):
"""
A multiple-select, except displays a list of checkboxes.
Iterating the field will produce subfields, allowing custom rendering of
the enclosed checkbox fields.
"""
widget = widgets.ListWidget(prefix_label=False)
option_widget = widgets.CheckboxInput()
生成复选框列表。我想以允许某些列表条目具有关联的 TextInput 字段的方式扩展此列表。选中该框时,需要输入相应的文本。
我是 Flask 和 WTForms 的新手,我在试图弄清楚如何解决这个问题时遇到了一些麻烦。我将不胜感激任何可能提供某种方向的建议。
【问题讨论】:
标签: python flask wtforms flask-wtforms