问题
Are there any way to replace html tag on WTForms?
Form code:
class BasicForm(Form):
some_select = RadioField("something", choices=[('first', 'first_choice'), ('second', 'second_choice')])
Thanks.
回答1:
Your field accepts a widget
argument you can pass to override default widget(that renders your field).
Docs:
http://wtforms.simplecodes.com/docs/0.6/fields.html#wtforms.fields.Field
来源:https://stackoverflow.com/questions/31405666/how-can-wtforms-radiofield-generate-html-without-ul-and-li-tag