果园,联系方式 [英] Orchard Contact Forms

查看:104
本文介绍了果园,联系方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图安装经乌节路CMS V1.6一个接触的形式,但我真的不知道该怎么做。

I've been trying to setup a contact form via Orchard CMS v1.6 but I'm not really sure how to do it.

我尝试安装了自定义表单模块,但我认为这ISN吨,我使用的是最新的版本兼容。

I tried installing the Custom Forms module but i think this isn't compatible with the latest version I'm using.

有什么建议?

推荐答案

自定义窗体模块是非常强大和灵活,但它并不明显起初如何使用它来作一个接触的形式。一旦你理解了它虽然你可以做更多的事情吧。

The Custom Forms module is very powerful and flexible, but it's not obvious at first how to make a contact form using it. Once you've figured it out though you can do a lot more with it.

第1步 - 创建您要收集的联系人信息的内容类型

在/管理/ CONTENTTYPES点击创建新的类型,以一种与所有你希望你的用户填写信息。

In /Admin/ContentTypes click 'Create new type' to make a type with all the info you want your user to fill in.

第2步 - 创建联系人自定义窗体页

在/Admin/Orchard.Customforms创建一个新的形式。在下拉内容类型选择您在步骤1中所做你可能也想勾选一旦表单提交保存内容项对话框中新的内容类型。你不需要为第3步将展示如何让您发送电子邮件,但我喜欢做的情况下,是有问题的电子邮件。

In /Admin/Orchard.Customforms create a new form. On the drop down for content type choose the new content type that you made in step 1. You probably want to also tick the 'Save the content item once the form is submitted' box. You don't need to as step 3 will show how to make it email you, but I like to do it in case there is a problem with email.

第3步 - 创建一个规则来向您发送电子邮件(在果园> 1.7使用工作流)

在/管理/规则创建新规则。

In /Admin/Rules create a new rule.

在事件部分选择当类型的自定义表单(你的新的内容类型)提交的事件。

In the events section select an event for When a custom form for types (Your new content type) is submitted.

在动作部分添加操作发送电子邮件。如果您选择发送给管理员,请确保您已经给admin用户的电子邮件(或者它只是默默地失败)。

In the actions section add an action to send an email. If you choose to send to admin, make sure you've given the admin user an email (or it just fails silently).

您可以使用电子邮件的主题和正文标记。我的是这样的:

You can use tokens in the subject and body of the email. Mine looks like this:

**Subject:** Orchard Contact Form - {Request.Form:Contact information.Name.Text}

**Body:** Name: {Request.Form:Contact information.Name.Text}
Email: {Request.Form:Contact information.Email.Value}

{Request.Form:Contact information.Yourmessage.Text}

姓名,Email和Yourmessage都在我的联系信息类型的所有字段名。对于你们这些将需要您的内容类型,并已添加到它的字段的名称。

Name, Email, and Yourmessage are all the field names on the my 'Contact information' type. For you these will need to be the name of your content type and the fields you've added to it.

这就是它。

更新:在果园1.7工作流程已经取代规则。这博客帖子进入有关如何使用它们进行接触的形式更多的细节。

Update: In Orchard 1.7 workflows have replaced rules. This blog post goes into more detail about how to use them to make contact form.

这篇关于果园,联系方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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