
WPPOP详细介绍过 Contact Form 7 表单插件的创建方法和基本用法。如果你在使用 Contact Form 7 插件,提交表单时遇到类似“One or more fields have an error. Please check and try again.” “出现错误,请检查后重新尝试。”的错误提示,可参考本文排查解决。

Contact Form 7 表单插件出现类似橙色框的错误提示,说明表单中有无效表单框,可以尝试逐个移除并排查。
如果是在WPPOP外贸模板中的 Product Inquiry 产品询盘表单中出现了这种错误,可以依照下面步骤排查。
1. 在网站后台的【 联系(Contact) -> 联系表单(Contact Forms)】中找到 Product Inquiry Form 表单,并打开,切换至 表单(Form)标签项,如下图所示:

2. 在其中分别找到以下代码段
[text* your-subject id:your-subject placeholder "Product Inquiry"]
和
[text your-productname id:your-productname] [text your-producturl id:your-producturl]
在各自表单的 id 属性后,添加自定义表单字段允许的最大长度代码: maxlength:9999。修改后的代码如下:
[text* your-subject id:your-subject maxlength:9999 placeholder "Product Inquiry"]
[text your-productname id:your-productname maxlength:9999] [text your-producturl id:your-producturl maxlength:9999]
出现这个错误的原因是系统获取的产品名称和页面URL地址超出了Contact Form 7 插件文本字段默认的最大长度80。
Contact Form 7 不同表单字段默认允许最大长度值
Contact Form 7 表单插件提供了几种类型的表单字段:text文本字段、email 电子邮箱字段 、tel电话号码字段、URL网址字段、textarea多行文本域字段。各种字段有默认的允许最大长度,如下表:
字段类型 | 默认最大长度 |
text 文本 | 80 |
email 电子邮箱 | 80 |
tel 电话号码 | 80 |
url 网址 | 80 |
textarea 多行文本域 | 400 |