Event.Form.Inputs(FID)
Event.Form.Inputs(FID) returns the form input element object identified by the Functional ID (FID). The Inputs elements allow users to enter data into the form. The Event.Form.Inputs(FID) allows the user to access the properties of the element including Required, Enabled, Visible, Value, and Display.
Note: Getting any form element object is an expensive scripting process. It is highly recommended that you only get a form element object once and store it in a local pointer object variable. Then use the pointer variable to get and set the various properties. See the example below.
Applies To
Properties and Methods
Properties
- .Array
- .Caption
- .Display
- .Enabled
- .FunctionalIdentifier
- .Options
- .Password
- .Required
- .Value
- .Visible
Methods
Available
The .Inputs(FID) method is available in:
-
15.03.016
-
All newer builds
Note: The .Inputs(FID) method and all sub-classes, properties, and methods are only available in Form Layout scripts.
Type
Input
Syntax
Event.Form.Inputs(FID);
Parameters
|
Parameter |
Required |
Description |
|---|---|---|
| FID | Yes | The Functional Identifier of the input element. To find this, right-click on the caption of the field you want to identify. The contextual menu will include a line for The Functional ID. |
Example
//--add this script to an event on the ContAdd form layout
var lpComp = Event.Form.Inputs('Input_eCONT_co_company');
var lcComp = lpComp.Value;
var lcCompCap = String.Trim(lpComp.Caption);
var llCompReq = lpComp.Required;
var llCompEn = lpComp.Enabled;
var llCompVis = lpComp.Visible;
var lcCompFID = lpComp.FunctionalIdentifier;
Event.Form.MessageBox('Here are certain properties of the \'' + lcCompFID + '\' element: ' +
'\nCaption: ' + lcCompCap +
'\nRequired: ' + llCompReq +
'\nEnabled: ' + llCompEn +
'\nVisible: ' + llCompVis +
'\nValue: ' + lcComp);
/* Expected Prompt response:
Here are certain properties of the 'Input_eCONT_co_company' element:
Caption: Company
Required: false
Enabled: true
Visible: true
Value: ABC Company
*/