gpt4 book ai didi

android - 如何将 Mailchimp 与 Ionic 应用程序集成?

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:54:21 25 4
gpt4 key购买 nike

我正在制作一个 Ionic 应用程序,我正在尝试集成 mailchimp。我正在使用嵌入式表单,只要我在浏览器( ionic 服务)上运行它,它们就可以工作,但每当我在 native 设备上测试时,它们就不起作用。有人知道怎么做这个吗?谢谢。

<!-- Begin MailChimp Signup Form -->
<link href="//cdn-images.mailchimp.com/embedcode/classic-10_7.css" rel="stylesheet" type="text/css">
<style type="text/css">
#mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; }
/* Add your own MailChimp form style overrides in your site stylesheet or in this style block.
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
</style>


<!--<label class="item item-input">
<span class="input-label">Email</span>
<input type="email">
</label>-->
<div id="mc_embed_signup">
<form action="//[businessname].[dc].list-manage.com/subscribe/post?u=[list]&amp;id=39c3c32163" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div id="mc_embed_signup_scroll">
<h3 class="padding">Don’t Miss Out on the Top Stories from Each Week!</h3>
<div class="mc-field-group">
<label for="mce-EMAIL" class="item item-input">
<span class="input-label">Email Address: </span>
<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
</label>
</div>
<div class="mc-field-group" >
<label for="mce-FNAME" class="item item-input">
<span class="input-label">First Name: </span>
<input type="text" value="" name="FNAME" class="" id="mce-FNAME">
</label>
</div>
<div class="mc-field-group" >
<label for="mce-LNAME" class="item item-input">
<span class="input-label">Last Name: </span>
<input type="text" value="" name="LNAME" class="" id="mce-LNAME">
</label>
</div>
<div class="mc-field-group" >
<label for="mce-MMERGE9" class="item item-input">
<span class="input-label">State: </span>
<input type="text" value="" name="MMERGE9" class="" id="mce-MMERGE9">
</label>
</div>
<div id="mce-responses" class="clear">
<div class="response" id="mce-error-response" style="display:none"></div>
<div class="response" id="mce-success-response" style="display:none"></div>
</div> <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_1b57193ff878b1601ed47f497_39c3c32163" tabindex="-1" value=""></div>
<div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button button-positive button-block"></div>
</div>
</form>
</div>
<script type='text/javascript' src='//s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js'></script>
<script type='text/javascript'>(function($) {window.fnames = new Array(); window.ftypes = new Array();fnames[0]='EMAIL';ftypes[0]='email';fnames[1]='FNAME';ftypes[1]='text';fnames[2]='LNAME';ftypes[2]='text';fnames[9]='MMERGE9';ftypes[9]='text';}(jQuery));var $mcj = jQuery.noConflict(true);</script>
<!--End mc_embed_signup-->

最佳答案

您需要更改两行。添加 #form 到表单标签和 (click)="form.submit()"到输入标签:

<form #form action="//[businessname].[dc].list-manage.com/subscribe/post?u=[list]&amp;id=39c3c32163" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>

<input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button button-positive button-block" (click)="form.submit()">

关于android - 如何将 Mailchimp 与 Ionic 应用程序集成?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41710599/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com