WordPress插件文档翻译之Contact Form 7(二)——标签语法
Tag Syntax
By Takayuki Miyoshi on November 17, 2009
标签语法
译者:包子(lilyfrank05@gmail.com) 2011年5月16日
Contact Form 7 allows you to edit the templates of your contact forms and your mail (mail headers and message body) with various “tags.” In the terminology for Contact Form 7, tag means a tiny formed string of type enclosed in square brackets ([ ]).
Contact Form 7允许你使用各种标签编辑你的联系表单和你的邮件(邮件头和邮件正文)的模板。在Contact Form 7的属于中,标签是指写在方括号([])里的一小段格式化的类型字符串。
Tags for forms and tags for mail look different from each other, for example, you can use [text* your-name] in your form and [your-name] in your mail. They each have a different syntax.
表单的标签和邮件的标签看起来不一样。比如,你咋表单中使用[text* your-name],而在邮件中使用[your-name]。他们有着不同的语法。
Form Tag Syntax
表单标签语法
A tag in a form template (“form tag”) will be replaced with an HTML element which represents an input field when it is displayed in an actual form. Components of a form tag are able to be separated into four parts: type, name, options and values.
一个表单模板的标签(表单标签)会由一个HTML元素所替代。这个元素在真实的表单中会表现为一个输入的字段。一个表单标签由四个部分组成:类型、标签名、选项和值。
Type is the most important factor, as it defines what type of HTML element will replace itself, and what kind of input is expected through it.
类型是最重要的元素,因为它定义了什么类型的HTML 元素会替代自身以及将会是何种输入类型。
Name is used for identifying the input field. Most form tags have a name, but there are exceptions.
标签名是用来识别输入字段的。大部分表单标签有标签名,但也有例外。
Options specify details of behavior and appearance. Options are optional.
选项指定了行为和呈现的细节。选项是选填的。
In most cases, values are used for specifying default values. It is possible that values can be used for other purposes as well; it depends on the type of the tag. Values are optional.
大多数情况下,值是用来指定默认值的。也有可能值被用于其他目的,这取决于标签的类型。值是选填的。
See also
- Text Fields (
text,text*,email,email*,textareaandtextarea*) - Checkboxes, Radio Buttons and Menus (
checkbox,checkbox*,radio,selectandselect*) - File Uploading and Attachment (
fileandfile*) - CAPTCHA (
captchacandcaptchar) - Quiz (
quiz) - Acceptance Checkbox (
acceptance) - Submit Button (
submit)
参看
- 文本字段
- 复选框、单选按钮和菜单
- 文件上传及附件
- 验证码
- 测验
- “接受”复选框
- 提交按钮
Mail Tag Syntax
邮件标签语法
A tag in a mail template (“mail tag”) is much simpler. A mail tag has only one word in it. In most cases, the word corresponds to the name of a form tag, and it will be replaced with the form input through it.
邮件模板中的标签(邮件标签)就简单多了。一个邮件标签只包含一个单词。大多数情况下,这个单词和一个表单标签的标签名相对应,而且会被一个输入的表单所替代。 


I’ve just watched the movie