Drupal - 通过网络表单模块订阅电子邮件列表
我想使用 Drupal 模块 Webform 和电子邮件营销框架来允许匿名用户填写简短的联系表单,然后通过 Campaignmonitor API 订阅列表。
到目前为止我的流程想法如下,我有兴趣看看是否有人能想到更简化的方法?
- 使用 hook_form_alter() 中断 Web 表单提交
- 提取表单数据(姓名、电子邮件地址)
- actions_do() 调用以触发 AID 为 2 的操作。操作 AID2 是 emf_subscribe_action() 的实例
- 根据需要传递表单数据并让 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?
- Webform submission interrupted using hook_form_alter()
- Form data extracted (Name, email address)
- actions_do() called to fire action with an AID of 2. Action AID2 is instance of emf_subscribe_action()
- 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
答案是使用 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