Add input fields dynamically with wtforms

后端 未结 2 558
花落未央
花落未央 2020-12-04 11:40

I\'m not quite sure how approach this matter. I hope i get there.

For example I have a table full of addresses on a page. The count of these are dynamic (could be 5

2条回答
  •  不思量自难忘°
    2020-12-04 12:01

    Sean Vieira's answer works great for StringFields (previously TextField), but things get a little trickier for dynamic SelectFields. For anyone interesting in how to implement dynamic SelectFields with wtforms, see https://stackoverflow.com/a/57548509/7781935

提交回复
热议问题