Magento:使用 jquery 发送联系表单

发布于 2024-12-21 16:14:34 字数 70 浏览 0 评论 0原文

如何编辑默认的 Magento 联系表单以使用 jquery 发送电子邮件,而不退出联系页面?

感谢您的帮助。

How can I edit the default Magento contact form to send email with jquery, without quitting the contact page ?

Thanks for help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

情绪 2024-12-28 16:14:34

您可以通过执行类似的操作来覆盖表单的默认行为。

jQuery.noConflict();

jQuery("#formId").submit(function() { 

// run your code

return false;

});

返回 false 将阻止表单发布

You can overide the default behaviour off the form by doing something like this.

jQuery.noConflict();

jQuery("#formId").submit(function() { 

// run your code

return false;

});

The return false will prevent the form from posting

别挽留 2024-12-28 16:14:34

原型在页面上仍然处于活动状态,因此您无论如何都可以使用它。本质上,您只需将提交按钮更改为调用 Form# 的普通按钮请求()

<button title="Submit" class="button" onclick="this.form.request();">
    <span><span>Submit</span></span>
</button>

Prototype is still active on the page so you can probably use it anyway. Essentially you only need to change the submit button to an ordinary button that calls Form#request()

<button title="Submit" class="button" onclick="this.form.request();">
    <span><span>Submit</span></span>
</button>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文