如何显示MailChimp表单在模式框中提交而不是重定向的响应? [英] How can I display the response of a MailChimp form submit in a modal box instead of redirecting?

查看:200
本文介绍了如何显示MailChimp表单在模式框中提交而不是重定向的响应?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 < form class =我的网站 form-stackedaction =http://coworkDF.us2.list-manage.com/subscribe/postmethod =post> 
< input class =span3id =MERGE0name =MERGE0type =emailautocapitalize =offautocorrect =offplaceholder =e-mail>
< input type =submitclass =btn float-right mail-sendvalue =Enviar>
< / form>

与其将它们重定向到确认页面,我很乐意在模式框中显示该确认无需离开页面。我使用Twitter Bootstrap工具包构建网站...他们有一个很好的模式框实用程序,但我不确定如何将它与MailChimp表单结合。



<任何想法?在此先感谢

解决方案

一般而言,您需要通过 ajax ,以便您保留在当前页面上,然后从响应中提取相关的部分并使用它们填充您的模式。


I currently have a standard form for users on my site to signup for our mailing list:

<form class="form-stacked" action="http://coworkDF.us2.list-manage.com/subscribe/post" method="post">
<input class="span3" id="MERGE0" name="MERGE0" type="email" autocapitalize="off" autocorrect="off" placeholder="e-mail">
<input type="submit" class="btn float-right mail-send" value="Enviar">
</form>

Instead of redirecting them to the confirmation page, I'd love to display that confirmation in a modal box without leaving the page. I'm using the Twitter Bootstrap toolkit to build the site... they have a nice modal box utility but I'm not sure how to combine that with the MailChimp form.

Any thoughts? Thanks in advance

解决方案

Just in general terms, you need to submit the signup request via ajax so that you stay on the current page, then extract relevant pieces from the response and use them to populate your modal.

这篇关于如何显示MailChimp表单在模式框中提交而不是重定向的响应?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆