car*_*arl 9 html forms flask-wtforms
我有一个字段,用户要求输入一年.我的HTML看起来像这样
<div class="form-group {% if form_search2.year_search.errors %} error {% endif %}" style="padding: 0px;">
<label class="col-xs-3 col-sm-2 control-label">{{ form_search2.year_search.label }}</label>
<div class="col-xs-6" style="max-width:320px;display: inline;">
{{ form_search2.year_search(class='form-control', style="max-width: 300px;", placeholder="e.g. 1996-2001", autocomplete="on", type="text") }}
</div>
<div class="col-xs-3" style="display: inline;">
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
形式定义为
year_search = TextField("Year:")
Run Code Online (Sandbox Code Playgroud)
当我在浏览器(Chrome)中查看此表单时,我收到了消息
Automatic credit card filling is disabled because this form does not use a secure connection
Run Code Online (Sandbox Code Playgroud)
我怎么能摆脱这个?我有其他字段,这些字段在相同的原因中定义,但它们记住之前输入的内容,并通过建议旧输入来帮助用户.
根据autofill_regex_constants.cc.utf8文件:
\n\n// On at least one page (The China Shop2.html) we find only the labels\n// "month" and "year". So for now we match these words directly; we\'ll\n// see if this turns out to be too general.\nRun Code Online (Sandbox Code Playgroud)\n\n第一个选项可以是更改字段名称。作为替代方案,我建议使用“让我们加密”来保护连接。根据谷歌安全博客:
\n\n\n\n从 2018 年 7 月发布 Chrome 68 开始,Chrome 会将所有 HTTP 站点标记为 \xe2\x80\x9c 不安全\xe2\x80\x9d。
\n