Form Field Schema

The fields in each form are represented as a SimpleList object containing a Dictionary object for each field in the form. Each of these Dictionary objects is populated with a well-known set of entries corresponding to attributes of the field; in other words, the schema for the field. The following table describes these attributes.

Field Schema Dictionary Key Description
Name An arbitrary string naming the field.
Label An arbitrary string providing a label for the field in the user interface. The string is retrieved from the MessageManager object for localization purposes.
Size A number providing the size of the input field.
MinLength A number providing the minimum required length of the input.
MaxLength A number providing the maximum required length of the input.
InputType A constant providing the type of the input field. Legal values are: TEXTBOX, LISTBOX, PASSWORD, and CHECKBOX.
ErrorMessage A string providing an error message when field validation fails. The string is retrieved from the MessageManager object for localization purposes.
IsRequired A Boolean specifying whether the field is required or not, and used during field validation.
Pattern An optional string providing a regular expression that must be matched for field validation to succeed.
PatternErrorMessage An optional string providing a custom error message when pattern validation fails.

If this dictionary entry is not supplied, and the Pattern entry is supplied, and pattern validation fails, the ErrorMessage entry will be used to report the error.

RawInput If this property is not Null, this form field will be retrieved without stripping the characters quote ("), left bracket (<), or right bracket (>), as normally performed by the routine GetRequestString.

If you read fields using this technique, make sure you do not write the field values back to the browser, as it could lead to erroneous interpretation of content as client script.

ListItems When the InputType entry is set to "LISTBOX", a SimpleList object that provides list box display names.
ListValues When the InputType entry is set to "LISTBOX", a SimpleList object that provides list box values corresponding to the display names.

Copyright © 2005 Microsoft Corporation.
All rights reserved.