Event.Form.Inputs(FID).Enabled

.Enabled allows the user to get and set the enabled property for the form element selected.

Notes:

  • Scripting can only set the .Enabled property if the form element's .Enabled property is true on the form open or record load event. If the element's .Enabled property was false at that time, then scripting cannot change this property.

  • The Event.Form.Invoke(FID, Event) will only fire if the form's .Enabled property is true.

  • The .Enabled property does not work on the Section form element, even though the property is on the Section Form Element Form Layout. If you want to disable or enable all elements in a section, you must set each element's .Enabled property

Applies To

Properties and Methods

None

Available

The .Enabled property is available in:

  • 15.03.016
  • All newer builds

Note: The .Enabled property and all sub-classes, properties, and methods are only available in Form Layout scripts.

Type

Boolean

Syntax

Event.Form.Inputs(FID).Enabled;

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 + ' enabled property is: ' + lpComp.Enabled);

 

/*Expected Prompt response:

Company enabled property is: true

*/