首页 > 解决方案 > 有没有办法,我们可以在flask的WTforms中使用表单字段的小标签文本?

问题描述

分享一小部分代码:

        <label>6. Are there any instruction **************** to help with similar problems?</label><br><br>
        Yes <input type="radio" name="Are there any instruction **************** to help with similar problems?"
                   value="yes" required /><br>
        No  <input type="radio" name="Are there any instruction ****************** to help with similar problems?"
                   value="no" checked="checked"/><br>
        <input type="text" name="Are there any instruction ****************** to help with similar problems?"
        /><br><br>

我需要将问题和答案都保存到数据库中。现在,我不想在forms.py 中有标签这样长的问题来验证在flask 中使用WTForms。如果我可以分配一个引用较大标签的 id 并且仍然能够将问题/答案保存到数据库,有没有办法?

标签: pythonhtmlflaskflask-wtforms

解决方案


推荐阅读