The custom fields in the templates are defined within comment mark-up. This means that the template should pass an XML validator in most cases even though information is not complete. A custom field is identified by <!—FIELD:Field name;Field parameters—>. For example, for a string field (where a simple textbox is shown for the user to enter any text they like) you could use <!—FIELD:Data;string—>. The pre-defined field types are:

string (<!—FIELD:FieldName;string—>)
Shows a textbox for the user to enter any text (no validation is performed on this text).

numeric (<!—FIELD:FieldName;numeric—>)
Shows a textbox to the user, and only numeric values (i.e. numbers) are allowed.

date (<!—FIELD:FieldName;date[;date format]—>)
Shows a date picker for the user to choose a date. Date format is optional, but if present the given format will be used when the date is put into the template

list (<!—FIELD:FieldName;list;option 1,option 2,…,option n—>)
Shows a drop-down list of values from which the user can choose one.

ElementCheckedList (<!—FIELD:FieldName;ElementCheckedList;Element name;Element value 1, Element value 2, … , Element value n—>)
Shows a drop-down list of element values for a custom XML element, from which a user can select multiple items. When this field is put into the template, the XML element is Element name, and its value is what the user chose from the drop-down list. An XML element is created for each of the options the user checks.

FolderId (<!—FIELD:FieldName;FolderId—>)
Allows the user to enter a folder Id (EWS). This is basically a textbox, but also supports distinguished folders (by name), so if the user enters inbox, then the field will be replaced as a DistinguishedFolderId (any other ID will be replaced as FolderId).

DistinguishedFolderId (<!—FIELD:FieldName;DistinguishedFolderId—>)
This shows a drop-down list containing all possible folders. The user can select any one of these folders. This field will put a DistinguishedFolderId element into the template.

ListenerURL (<!—FIELD:FieldName;ListenerURL—>)
This field is used to specify the address of an HTTP listener. If this field is found in a template, then an HTTP listener is automatically created (if it doesn’t already exist) and its URL placed in the textbox. The user can change the value to any other URL as needed.

Last edited Jan 17, 2012 at 12:11 PM by purplepomegranite, version 3

Comments

No comments yet.