Definitions Folder

The Definitions folder, residing in the Administration cabinet, contains definitions that define Astoria webform fields and layout.

Document, Repeat Group, and Field definitions

The Definitions folder contains two folders:
  • System
  • User
The folders within the System folder contain all default definition documents that come with Astoria.
Each of these folders contain five subfolders:
  • Documents
  • Fields
  • Folders
  • HTML Templates
  • Repeat Groups
Important: Do not modify files in the System folder. You may lose your changes during the next system upgrade. Instead, create documents in the User folder. You can create new definitions or override existing System definitions by creating documents in this folder. If you create a definition document with the same name as the one in the System folder, your definition overrides the Astoria-supplied definition.

A document definition defines the set of fields that make up a form of that document type. When a user creates a form of this type, the system enforces the set of fields that make up the document. Administrators can define custom document definitions.

A field is a low-level component of a form document. A field definition is a document that defines the attributes of a field, one of the most important of which is the type. The type of the field indicates how it stores its value.
CAUTION:
Do not include a field definition multiple times in a repeat group or document definition. It results in data loss under some editing operations.
Examples of field types include:
  • Text
  • Choice (a list of possible values)
  • Check box (on or off)
Other attributes describe how the field is displayed to the user.

A repeat group is a collection of fields that may occur multiple times in a document. As with document and field definitions, a repeat group definition is a itself a form document. When you edit a form document that contains a repeat group, you can specify multiple sets of values for the fields in the repeat group. For example, you may have a set of fields that specifies an address (Name, Address, City, State, Zip). By putting these fields into a repeat group, and putting the repeat group into a document definition, the user is able to add multiple addresses to instances of that document.

For example, if you want to create a document type that describes the contact information of a person, you can store the following about the person: Name, Job Title, and Phone Numbers.

You need a field to hold the name of the person, so you create a Name field that is of type "small" (which is a one-line text field). Job Title is similar, with another "small" field called JobTitle. For the Phone numbers field, you may want to allow multiple values. So it is considered a repeat group. You may want two pieces of information for each number: the number itself, and what type of device it represents (office phone, mobile, fax, and so on), therefore, the repeat group consists of two fields. The PhoneType field should be of type "choice", and the list of choices could be "office, fax, mobile, home". The Number field is just a "text" field, perhaps with a field validation to verify that it is a well-formed phone number. The PhoneNumber repeat group contains these two fields.

If you want to use a field multiple times, create a similar field definition with a distinct name.

For example, instead of the following:

headerBlock

imageTag

CopyBlock

imageTag

Use fields such as:

headerBlock

imageTag1

CopyBlock

imageTag2

Document definition contains the following:

About Properties

Properties consist of name/value pairs. The valid property names are listed below. After each property there is a description of what the value field should contain:

About Overrides

Overrides consists of triplets of information:

Specifying an override causes the specified property of the field (or repeat group) to have the specified value. This allows a document definition override field and repeat group properties, and for a repeat group definition to override field properties. For example, the field definition "foo" may have a property name/value, but the document definition "bar", that includes that field definition, may wish to specify a different value for that property. (Without this technique, you have to create a new field definition, identical to the original field definition except for the property of interest, and reference the new field definition in your document definition.)