联系表 7 验证
Contact Form 7 Validation
我有一个联系表 demo_mode。该表单有一个提交按钮,分配了以下附加设置
on_submit: "window.open("https://www.google.com","_self");"
单击提交按钮后,页面转到 Google。我可以看到执行了表单验证,因为在无效字段下有警告行,但它仍然转到 Google.
谁能告诉我如何停止提交无效表单?谢谢
您应该考虑改用 on_sent_ok
hook:
on_sent_ok: "window.open('https://www.google.com', '_self');"
仅当表单已无误提交且已发送电子邮件时才会触发。
此外,请注意到处使用双引号。
我有一个联系表 demo_mode。该表单有一个提交按钮,分配了以下附加设置
on_submit: "window.open("https://www.google.com","_self");"
单击提交按钮后,页面转到 Google。我可以看到执行了表单验证,因为在无效字段下有警告行,但它仍然转到 Google.
谁能告诉我如何停止提交无效表单?谢谢
您应该考虑改用 on_sent_ok
hook:
on_sent_ok: "window.open('https://www.google.com', '_self');"
仅当表单已无误提交且已发送电子邮件时才会触发。
此外,请注意到处使用双引号。