• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

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

[复制链接]
菜鸟教程小白 发表于 2022-12-11 18:36:51 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题

我正在制作一个 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-->



Best Answer-推荐答案


您需要更改两行。将#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/

回复

使用道具 举报

懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注0

粉丝2

帖子830918

发布主题
阅读排行 更多
广告位

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap