Drupal - 通过网络表单模块订阅电子邮件列表

发布于 2024-10-11 01:15:40 字数 425 浏览 0 评论 0原文

我想使用 Drupal 模块 Webform 和电子邮件营销框架来允许匿名用户填写简短的联系表单,然后通过 Campaignmonitor API 订阅列表。

到目前为止我的流程想法如下,我有兴趣看看是否有人能想到更简化的方法?

  1. 使用 hook_form_alter() 中断 Web 表单提交
  2. 提取表单数据(姓名、电子邮件地址)
  3. actions_do() 调用以触发 AID 为 2 的操作。操作 AID2 是 emf_subscribe_action() 的实例
  4. 根据需要传递表单数据并让 EMF 进行与活动监视器。

在我看来,这种方法允许我建立一个可以在现场进行管理的系统,而不需要 PHP 开发。我正在考虑设置某种内容类型,在其上启用网络表单,然后每次用户创建这些网络表单之一时,都可以调用该操作。

I want to use the Drupal modules Webform and Email Marketing Framework to allow anonymous users to fill out a short contact form and then be subscribed via the campaignmonitor API to a list.

So far my process idea is as follows, and I'm interested to see if anyone can think of a more streamlined approach?

  1. Webform submission interrupted using hook_form_alter()
  2. Form data extracted (Name, email address)
  3. actions_do() called to fire action with an AID of 2. Action AID2 is instance of emf_subscribe_action()
  4. Pass form data as appropriate and let EMF do the work communicating with campaign monitor.

As I see it this approach allows me to set up a system which can be administrated all on-site without the need for PHP development. I'm reckoning on setting a certain content type, enabling webforms on it, and then each time a user creates one of these webforms, the action can be called.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

唐婉 2024-10-18 01:15:41

答案是使用 Webform 创建表单,然后使用 EMF 模块来执行活动监控集成。我必须创建一个自定义模块来拦截特定表单的提交并触发电子邮件请求。我还必须将详细信息写入 CSV,因此这是这里的额外代码块。

这是该模块的主要内容,以防将来其他人需要它:
http://drupal.org/node/1022916

The answer was to use Webform to create the form and then the EMF module to perform the campaign monitor integration. I had to create a custom module to intercept the submission of the particular form and fire off the email request. I also had to write the details to a CSV, so that's the extra chunk of code here.

Here's the meat of the module just in case anyone else need this in the future:
http://drupal.org/node/1022916

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文