Event.Form.Inputs(FID).Required
.Required allows the user to get and set the required property for the selected form element.
Note:
-
Scripting can only set the required property if the form element's required property is false on the form's record load event. If the element's required property was true at that time, then scripting cannot change this property.
Applies To
Properties and Methods
None
Available
The .Required property is available in:
- 15.03.016
- All newer builds
Note: The .Required property and all sub-classes, properties, and methods are only available in Form Layout scripts.
Type
Boolean
Syntax
Event.Form.Inputs(FID).Required;
Parameters
None
Example
//--Add this script to the contadd record load event to view
var lpComp = Event.Form.Inputs('Input_eCONT_co_company');
Event.Form.MessageBox(lpComp.Caption + ' required property is: ' + lpComp.Required);
/*Expected Prompt response:
Company required property is: false
*/