How can I display the response of a MailChimp form

2019-08-03 20:40发布

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

1条回答
倾城 Initia
2楼-- · 2019-08-03 21:24

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.

查看更多
登录 后发表回答