Jony cruse
Jony cruse

Reputation: 845

How can WTForms RadioField generate html without <ul> and <li> tag?

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.

Upvotes: 2

Views: 1225

Answers (1)

Ergo
Ergo

Reputation: 1234

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

Upvotes: 1

Related Questions