See Also

This class has no related objects.

Enumerations

Name Values
Alignments Left
Right
Center
FieldTypes Text
Color
Date
DateTime
DateTimeLocal
Email
Number
Password
Telephone
Time
Url
Week
Positions Left
Right
States Unvalidated
Valid
Invalid

Constants

Name Type Value

This class exposes no constants.

Events

Definition Description
MaskComplete() Raised when the user has completed the assigned Mask, if one is supplied.

Methods

Definition Description
LabelClick() Raised when the user clicks the label.
ValueChanged() Raised when the user changes the value of the field.

Properties

Name Type Default Value Description
FieldStyle WebStyle Nil Style applied to the field portion of the class.
IconHeight Integer 16 Height of IconObject when specified.
IconObject Picture Nil Custom icon displayed in the label portion.
IconWidth Integer 16 Width of IconObject when specified.
Label String Caption of the label portions of the class. Supports FontAwesome icons.
LabelAlignment GraffitiWebTextField.Alignments Left Alignment of text and icons in the label portion of the field.
LabelPosition Positions Left The location of the label in relation to the field.
LabelStyle WebStyle Nil Style applied to the label portion of the class.
LabelVisible Boolean True When False, only the text field portion of the component will be displayed.
LabelWidth Integer -1 Static width of label portion. -1 for auto.
Mask String “” Mask applied to entered data, see GraffitiWebFieldMask for more information.
MaskValid Boolean False This property is set to True when the user has completed the defined mask.
MaxLength Integer -1 Maximum number of characters that the field can contain. Set to -1 for the maximum HTML limit of 524288.
Placeholder String “” Placeholder text.
ReadOnly Boolean False If True users cannot edit the contents of the field.
Required Boolean False Denotes within the display that this field is required.
State States Unvalidated The validation state of the field.
Style WebStyle Nil Applies a WebStyle to the background of the component.
Type FieldTypes Text The type of field, not all types are supported by all browsers.
Value String “” The value of the field. Updates on focus loss to reduce communication with the server.

Examples

State

This snippet changes the state of the field based on the length of the field's text:

if me.Value.Len > 3 then
  me.State = GraffitiWebTextField.States.Valid
elseif me.Value.Len > 0 then
  me.State = GraffitiWebTextField.States.Invalid
else
  me.State = GraffitiWebTextField.States.Unvalidated
end if

Notes

This class currently has no notes.