FormControl Class

This object represents a single form field.

Note Form array controls are 1-based, so they always start with row number 1 (not 0).

Properties

PROPERTY NAME

DATA TYPE

DESCRIPTION

Name

String

The name of the form field

FCID

String

The ID of this form field

Text

String

The string/text representation of the form field’s value

Value

Data type of Form Field

The raw value of a form field

Number

Decimal

The numerical representation of the form field’s value

DateTime

DateTime

The DateTime object that represents the form field’s value

DisplayString

String

This property can be used to get (but not set) the form control’s display string.

Checked

Boolean

This represents whether the control is checked (true/false, for Check Box controls only)

Expanded

Boolean

This represents whether the control is expanded or collapsed (true/false, for Sections only)

ClientID

String

The client-side ID which can be used by JavaScript to access the control

IsInArray

Boolean

True if the control exists within an array; false otherwise

DDHasItems

Boolean

This represents if the DropDown control has items in it (true/false, for DropDown controls only)

ColumnChildren

List Object

A list of controls in an array column (for Array column controls only)

ArrayFCID

String

If this control is in an array, the FCID of the array control

ArrayNum

Integer

If this control is in an array, the row number

ArrayName

String

If this control is in an array, the name of the array

ArrayControl

Form Control Object

If this control is in an array, the FormControl of the array

ArrayColumns

List Object

If this control is an actual array, the List<FormControl> of children

Display.EventField

Boolean

Sets if the control is an event field (eYNU)

Display.DataType

Code Enum

Sets the Data Type of the control (FormEnums.eDataType enum)

Display.FriendlyName

String

Sets the friendly name of the control

Display.Visible

Boolean

Gets or sets if the control is visible (eYNU)

Display.Enabled

Boolean

Gets or sets if the control is enabled (eYNU)

Display.Required

Boolean

Gets or sets if the control is required (eYNU)

Display.Style

String

Gets or sets the style of the control, using CSS style directives, e.g.:

myFormControl.Display.Style = "color: red;
    font-weight: bold;
";

Display.ToolTip

String

Gets or sets the tooltip for this control

Display.Control

Form Control Object

Gets the actual ASP.NET Control of this Form control

Examples

// Sets the control “MyTextBox” as an event field
CurrentForm.FormControl("MyTextBox").Display.EventField = eYNU.Yes;

// Sets the control “MyTextBox” Friendly Name
CurrentForm.FormControl("MyTextBox").Display.FriendlyName =
    "Your current address";

Methods