UserGuide

Web Text Field

From Xojo Documentation

Text Fields display text in a single-line text entry field, such as the login field seen on many web pages. Use the Set Default Value feature to set the default text for the text field.

Below is a list of common events, properties and methods. For the complete list, refer to WebTextField in the Language Reference.

Events

ValueChanged - Called when the text has been changed, but only after the user has pressed return, enter or the field has lost focus.

Properties

Hint - Gets or sets the hint text (prompt text) that is displayed within the Text Field.

ReadOnly - Use to get or set the read-only setting. When read-only, the user cannot type in the field, but they can copy text from it.

Value - Contains the text displayed in the text field.

FieldType - A text field can have these types: Normal, Password, E-Mail Address, Number, Telephone Number, URL (see table below).

Special Fields

In addition to a standard Text Field, a Text Field can also have these special types.

Field Type Description
Password A Text Field with its type preset to Password. This field works on all browsers.
E-mail A Text Field with its type preset to Email. Only supported on iOS.
Number A Text Field with its type preset to Number. Supported on Safari, Chrome and iOS.
Telephone A Text Field with its type preset to Telephone. Only supported on iOS.
URL A Text Field with its type preset to URL. Only supported on iOS.

Usage

To get what the user has typed in a Text Field, use the Value property:

Var firstName As String
firstName = FirstNameField.Value

See Also

WebTextField class; UserGuide:Web Text Area topic