【发布时间】:2014-07-17 21:13:01
【问题描述】:
我想使用 Jquery 添加或删除带有按钮的新 WTForm 输入字段,就像这里 http://www.sanwebe.com/2013/03/addremove-input-fields-dynamically-with-jquery/comment-page-1 但使用我的表单域。
我的表格:
class EditBook(Form):
title = TextField('title', validators = [Required()])
authors = FieldList(TextField())
问题是我不能只是追加例如
$(InputsWrapper).append("{{form.authors(size=20)}}");
它只是打印这个文本。
【问题讨论】:
标签: jquery python wtforms flask-wtforms