转换Gumby新信息表以与MailChimp一起使用

时间:2015-12-18 08:55:42

标签: html css mailchimp newsletter gumby-framework

我在Gumby框架中预设了这个表单:

<ul>
   <li class="append field">
      <input class="wide email input" type="email" />
      <div class="medium primary btn">
         <a href="#">Go</a>
      </div>
   </li>
</ul>

Codepen

我想修改它以便它可以用作mailchimp新闻通讯表格:

<!-- Begin MailChimp Signup Form -->

<link href="//cdn-images.mailchimp.com/embedcode/slim-081711.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>
<div id="mc_embed_signup">
   <form action="//mydomain.list-manage.com/subscribe/post?u=xxxxx&amp;id=xxxxxx" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
      <div id="mc_embed_signup_scroll">
         <label for="mce-EMAIL">Subscribe to our mailing list</label>
         <input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="email address" required>
         <!-- 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="hash_number" tabindex="-1" value=""></div>
         <div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
      </div>
   </form>
</div>

Codepen

你能引导我完成这个过程吗?

1 个答案:

答案 0 :(得分:2)

我开始使用您提供的MailChimp注册表单,并将它与您想要的HTML / CSS代码合并。这是代码:

<div id="mc_embed_signup">
  <form action="//mydomain.list-manage.com/subscribe/post?u=xxxxx&amp;id=xxxxxx" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
    <div id="mc_embed_signup_scroll">
      <ul>
        <li class="append field">    
          <input type="email" value="" name="EMAIL" class="wide email input" id="mce-EMAIL" required>
          <!-- 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="hash_number" tabindex="-1" value=""></div>
          <div class="clear medium primary btn">
            <input style="font-weight:bold;" type="submit" value="Go" name="subscribe" id="mc-embedded-subscribe" class="button">
          </div>
        </li>
      </ul>      
    </div>
  </form>
</div>

JSFIDDLE演示: https://jsfiddle.net/9f3db7Lw/1/

我尝试使用'domain.list-managed'我必须验证它是否有效并且没问题。如果你替换你的域名,我想你可以直接使用它。

干杯, 乔尔

相关问题