The following table identifies form components in the order in which they appear in the form. Each form component is discussed in greater detail below.
Table 2–7 Form Components
Form Component |
Purpose |
---|---|
header |
Introduces information about the form object definition. Includes start tags for <Form>, <Extension>, and <Configuration> elements and defines form properties (such as title, subtitle, titleWidth displayed when the form is launched). |
form body |
Contains field definitions, form functions, form variables. This is the part of the form that you will edit. |
footer |
Closing tags for <Form>, <Extension>, and <Configuration> elements. |
The form header includes:
Standard introductory information included in XML files: the XML declaration and documentation declaration, including the DTD associated with this XML file. In the preceding example, this introductory information is:
<?xml version=’1.0’ encoding=’UTF-8’?> <!DOCTYPE Configuration PUBLIC ’waveset.dtd’ ’waveset.dtd’>
This system appends this information to the file. Do not edit.
Start tags for the <Extension> and <Configuration> elements, which surrounds the HTML components that describe the form’s appearance and behavior. The Configuration element contains attributes that describe the form object properties.
The header contains information about the form, including internal identification such as date of creation, login of whoever last modified the file, and the form type. The page processor typically generates this information.
The system generates the following information for internal use only. Do not edit these attributes.
Element |
Definition |
---|---|
<Extension> |
Required to wrap the <Form> element. <Element>…</Element> |
<Configuration> |
Contains information that the system uses internally when processing the form object, including the date of last modification and login of the user who last modified this form. Most of this information is typically associated with any persistent object that is stored in the Waveset repository. You typically do not need to edit this information. Configuration id=’#ID#UserForm:EndUserMenu’ name=’End User Menu’ createDate=’1012185191296’ lastModifier=’Configurator’ lastModDate=’1013190499093’ lastMod=’44’ counter=’0’ wstype=’UserForm’> |
The form body is composed of:
Form properties, which include title, subtitle, and width. These properties are defined in the table titled Form Properties.
Field elements, which you use to determine the appearance and function of the fields as they appear to the user in the product interface. Fields can also contain XPRESS logic to calculate information. For more information on using the XPRESS language, refer to XPRESS Language.
The following table lists form header properties.
Table 2–9 Form Header Properties
Property |
Purpose |
---|---|
title |
Identifies the text that appears at the top of the form. Typically, this title is in a bold font typically larger than the other font on the screen. The form title appears under the Waveset page. You cannot edit the display characteristics of title. In the example given in the section titled Form Components, the value of title is User Self Service |
subtitle |
Identifies text that appears under title of the form on the page defined by this form. You cannot edit the display characteristics of title. In the preceding example, the value of subtitle is Select one of the following options |
titleWidth |
Defines the width in pixels of the value of title in the browser window. |
The following table lists all elements that can occur within the form body.
Table 2–10 Elements that Can Occur within the Form Body
Component |
Definition |
Example |
---|---|---|
defun |
Defines an XPRESS function. This element can be called by any field element in a form. |
<defun name=’add100’> <def arg name=’x’/> <add><i>x</i><i>100</i> </add> </defun> |
defvar |
Defines an XPRESS variable that is used to hold the results of a computation. |
<defvar name=’nameLength’ <length> <ref>fullname</ref> </length> </defvar> |
Display |
Identifies the display components that will define the appearance of the field. See the section titled Display Element for more information. |
<Display class=’LinkForm’> <Property name=’title’ value=’User Self Service’/> <Property name=’subtitle’ value=’Select one of the following options’/> </Display> |
Field |
Main element used within the form body. See the section titled Field Element for more information. |
<Field name=’fullname’/> |
FieldRef |
Provides a reference to a field defined in an included form. |
<FieldRef name=’fieldName’/> |
Include |
Provides a reference to another form object. Once included in the current form, the fields defined in the form can be referenced and displayed. |
<Include> <ObjectRef type=’UserForm’ id=’#ID#UserForm:UserFormLibrary’/> </Include> |
FormRef |
Provides a reference to another form object. |
<FormRef name=’formName’/> |
Namespace |
Provides a way to define a shortcut to a view. The shortened name can then be used in field names and references instead of the longer name. When using the name substitution, use a colon (:) following the name. |
<Namespace name=’w’ value=’waveset’/> |
The <Form> element must surround all Field elements and contains the unique name of the form. The elements listed on the previous page are contained within the beginning and ending Form tags.
<Form name=’Create User Form’ <Field name=’waveset.accountId’> additional fields </Form> Additional example: <Form name=’Task Launch Form’> <Display class=’EditForm’> <Property name=’title’ value=’Task Launch’/> <Property name=’subTitle’ value=’Enter task launch parameters’/> </Display> ... </Form> |
A Display element within the Form element describes the component that will be used to render the form. By default, this Display element is the used EditForm component. You will rarely need to change the Form component class, but you can set component properties. The two most common properties to specify are title and subTitle.
EditForm also supports the adjacentTitleWidth property, which can be used to set the width of the titles of adjacent fields. If this property is not defined, it defaults to zero.
If you define adjacentTitleWidth as equal to zero, columns titles will automatically resize. If set to a non-zero value, then the title width of adjacent columns (for example, the second and third columns) will be the value of adjacentTitleWidth.
<Form name=’Default User Form’ help=’account/modify-help.xml’> <Display class=’EditForm’> <Property name=’titleWidth’ value=’120’> <Property name=’adjacentTitleWidth’ value=’60’> </Display>
The Field element is the main element used within the form body. Fields are used to define each of the user’s attributes. You can use Field elements to include XPRESS logic in form fields. For more information on working with form field elements, refer to the section titled Defining Fields.
The following example creates an editing field with the label Email address.
<Field name=’waveset.email’> <Display class=’Text’> <Property title=’Email Address’/> <Property size=’60’/> <Property maxLength=’128’/> </Display> ... </Field>
The name of an editing field is typically a path expression within a view that is being used with the form. In this example, waveset.email refers to the email address associated with a user object in the Waveset repository.
The footer contains information about the Waveset object group or organization with which the form is associated. It also contains the closing tags for the </Form>, </Extension>, and </Configuration> elements or other elements opened in the header. The footer in the preceding example is:
</Form> </Extension> <MemberObjectGroups> <ObjectRef type=’ObjectGroup’ id=’#ID#Top’ name=’Top’/> </MemberObjectGroups> </Configuration>
<MemberObjectGroups> identifies the object group or organization into which the system stores an object. If you do not specify an object group, by default the system assigns the object to the Top organization. For Configuration objects that contain forms, are typically found in the All group with this syntax:
<MemberObjectGroups> <ObjectRef type=’ObjectGroup’ name=’All’/> </MemberObjectGroups>