我有一个字段,用户要求输入一年.我的
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>
形式定义为
year_search = TextField("Year:")
当我在浏览器(Chrome)中查看此表单时,我收到了消息
Automatic credit card filling is disabled because this form does not use a secure connection
解决方法
根据
autofill_regex_constants.cc.utf8文件:
// On at least one page (The China Shop2.html) we find only the labels // "month" and "year". So for now we match these words directly; we'll // see if this turns out to be too general.
第一个选项可以是更改字段名称.作为替代方案,我建议使用Let’s encrypt来保护连接.根据Google Security Blog:
Beginning in July 2018 with the release of Chrome 68,Chrome will mark all HTTP sites as “not secure”.