Core object
Created by
The Form object is a top-level, predefined MetaScript object. You can automatically access it without using a constructor or calling a method.
Description
The predefined Form object is designed to allow form scripts to add event listeners and to globally access the form in which the MetaScript is being executed.
Property Summary
Property | Type | Read-only | Description |
---|---|---|---|
body | unspecified | yes | Reference to the form's "body" container element. |
formName | String | yes | Name of the form. |
groupName | String | yes | Name of the current group (applicable in Browser window only). |
isObjectLocked | Boolean | yes | true if object is locked by the form. |
mode | String | yes | Form mode; can be one of the following:
|
object | Object | no | An associative array of object fields. |
objectState | String | yes | State of the object currently displayed in the form; can be one of the following:
|
objectType | String | yes | Form's object type. |
window | String | yes | Type of the form's container window; predefined values include: "browser", "finds", "modify", "attach", "template", "history", "form_preview". |
windowTitle | String | no | Title of the form's container window. New in package 167 |
isChromeless | Boolean | yes | true if form is displayed in chromeless mode. New in package 167 |
Method Summary
Method | Description |
---|---|
addEventListener | Adds a specified event listener for the specified event type. |
createControlFromXML | Creates a form control from its XML definition. |
createControlIterator | Returns an object that allows iteration over the form's controls. |
getControlById | Returns the object corresponding to the form control with the specified ID. |
getControls | Returns an object with the form controls as properties. |
GetCurrentDate | Returns a Date object corresponding to the current server date. |
GetCurrentTimestamp | Returns a Date object that corresponds to the current server date and time. |
GetField | Returns the value of a field in the form. |
removeEventListener | Removes an event listener created by addEventListener. |
SetField | Sets the value of a field to the given value. |
reloadObject | Reload object inside form. New in package 166 |