联系表格7-在电子邮件发送中添加自定义功能 [英] Contact Form 7 - add custom function on email send
本文介绍了联系表格7-在电子邮件发送中添加自定义功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
只需使用 Wordpress /联系表格7
。
是否可以在成功发送电子邮件时添加自定义javascript函数是事件吗?
Just playing around with Wordpress / Contact Form 7
.
Is it possible to add custom javascript function on successful email send event?
推荐答案
在联系表单配置页面底部的其他设置中写入以下内容:
Write this in additional settings at the bottom of the contact form configuration page:
on_sent_ok: "some js code here"
更新:
您可以使用它来调用如下函数:
UPDATE: You can use it to call functions like this:
on_sent_ok: "your_function();"
或编写一些代码(此代码重定向到谢谢页面):
Or write some code (this one redirects to thank you page):
on_sent_ok: "document.location='/thank-you-page/';"
这篇关于联系表格7-在电子邮件发送中添加自定义功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文