search

Home  >  Q&A  >  body text

python - flask如何根据RadioField的值隐藏某个StringField

有表单:

       method = RadioField('method', choices=[(1,'GET'),(2,'POST')],default=1)

       data = StringField('data')

如何根据RadioField 隐藏或者显示data,比如get时隐藏,post时显示

views中的index.html 使用flask-bootstrap,是直接{{ wtf.quick_form(form) }}

需要怎么改造?

高洛峰高洛峰2888 days ago656

reply all(2)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-04-18 09:05:38

    You can control this using js on the front end.

    reply
    0
  • 高洛峰

    高洛峰2017-04-18 09:05:38

    This can only be controlled by JS and belongs to the front end

    reply
    0
  • Cancelreply