转换 Gumby 时事通讯表格以使用 MailChimp

Transform a Gumby newletter form to work with MailChimp

我从 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

你能指导我完成整个过程吗?

我从您提供的 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' 我必须验证它是否有效并且没问题。我认为如果替换为您的域,您可以直接使用它。

干杯, 乔尔