将MailChimp订户添加到具有注册表单而不是API的组中 [英] Add MailChimp subscriber to group with signup form, not API

查看:117
本文介绍了将MailChimp订户添加到具有注册表单而不是API的组中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道您可以使用API​​来执行此操作,但是不确定常规的注册表单.

I know you can do this with the API, but not sure about the regular signup form.

有人知道是否可以在MailChimp中的高级注册表单中添加一些代码,以将其自动添加到我列表中的特定组中吗?

Does anyone know if it is possible to add some code to the advanced signup form in MailChimp that would automatically add them to a specific group within my list?

我仅收集电子邮件地址,并且不希望订阅者必须手动选择组.如果他们使用的是表格,我希望将他们添加到该组中.

I am only collecting the email address and I don't want the subscriber to have to select the group manually. If they are using that form, I want them added to that group.

我已经向MailChimp寻求帮助,但是他们告诉我他们的客户支持没有代码,我应该聘请专家.

I have asked MailChimp for help, but they tell me that their customer support doesn't code and that I should hire an expert.

也许相关代码的一段可能会有所帮助:

Perhaps a segment of the relevant code may help:

<form action="http://lalala.us2.list-manage1.com/subscribe/post" method="post">
<input type="hidden" name="u" value="345fc4974810ef65c8276c8">
<input type="hidden" name="id" value="25c4d1b28">
<table cellpadding="5" cellspacing="0" border="0" align="center">

<tr>
<td align="right" class="formLabel"><strong>Email Address</strong> <span class="asterisk">*</span>:</td>
<td align="left">
    <input type="email" autocapitalize="off" autocorrect="off" name="MERGE0" id="MERGE0" size="25" value="*|MERGE0|*">
<br><span class="error">*|HTML:EMAILERROR|*</span></td>
</tr>

是否存在可以使用列表分组名称添加的隐藏输入类型,该名称将自动将它们添加到组中?

Is there a hidden input type that I can add with a list grouping name that will auto add them to a group?

推荐答案

这是一个老问题,但是我碰到它自己在寻找答案,却找不到一个好答案(包括此处的其他答案)充其量只能算是穷人).当我在此上找不到任何东西时,我可以通过一些试验就可以弄清楚.

This is an old question, but I came across it looking for the answer myself and couldn't find a good answer anywhere (including the other answer here which is poor at best). When I couldn't find anything on this I was able to figure it out with a little experimentation.

这需要几个步骤.首先,添加组和要包含该组的选项(如果需要,只能为1).最初,请确保该组未设置为隐藏.在MailChimp中的注册表单">常规表单"下,转到您的主要默认注册表单.验证组"选项是否可见,然后使用注册表单" URL访问您托管的注册表单.现在,使用鼠标右键单击>查看源,在浏览器中打开原始HTML.您需要找到所需组/选项的INPUT元素.它可能看起来像这样:

It requires a couple steps. First, add your Group and the options you want the Group to contain (it can only be 1 if you want). Initially make sure the Group is not set to hidden. Go to your main default sign-up form in MailChimp under Sign Up Forms > General Forms. Verify the Group option(s) are visible and then use the Sign up form URL to visit your hosted sign-up form. Now, open the raw HTML in your browser using right-click > View Source. You need to find the INPUT element for the group / option you want. It will probably look something like this:

<input type="checkbox" data-dojo-type="dijit/form/CheckBox" id="group_8" name="group[13257][8]" value="1"  class="av-checkbox">

在这里,name参数至关重要.将整个输入元素复制并粘贴到自定义表单中.现在,使用内联CSS隐藏它,并使用HTML对其进行硬编码以进行检查.您也可以删除多余的东西.自定义表单中的最终版本应如下所示:

The name parameter is the critical thing here. Copy and paste that entire input element inside your custom form. Now, use inline CSS to hide it and HTML to hard-code it to checked. You can also remove extra stuff too. The final version in your custom form should look something like this:

<input type="checkbox" id="group_8" name="group[13257][8]" value="1" checked="checked" style="display:none">

这将确保它对用户不可见,但是它将自动将它们添加到您从显示它的表单中获取的name参数定义的组中.

This will ensure that it is not visible to the user but it will automatically add them to the group defined by the name parameter that you grabbed from the form which showed it.

最后一步是返回并确保将组"设置为隐藏",以确保它不会无意间显示在其他表单上.

The final step is to go back and make sure you set that Group to Hidden to make sure it doesn't inadvertently show up on other forms.

非常简单!

这篇关于将MailChimp订户添加到具有注册表单而不是API的组中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆