Properties of a Text Box

See Basic controls.

Enabled

Allow the control to be enabled at runtime.

Name

By default, the control ID appears as the name of the control. Change the ID to make the control easier to identify during mapping. For example, use "CustName" instead of "Label1".

Read Only

Makes the text box non-editable at runtime. (Default: No).

Text

Specifies the text that appears at runtime. Change the default text (textbox1) to something meaningful. For example, use "Customer name" instead of "textbox1".

Tooltip

Use tooltips to display supplementary information about the text box.

For example, inform the user that the name must start with a Capital letter. Add a tooltip for the Customer Name field in the Customer Details form similar to "Enter your name here. Make sure that the name starts with a Capital letter."

State

Choose whether the control state should be hidden, optional or mandatory. (Default: optional)

Security Token

Use security tokens to make the form more secure. See Security tokens.

Show Label

Displays the label for a control such as text box, drop-down list and radio button list, at runtime. Clear the check box to hide the label.

Error Message

Specify a message to appear at runtime when a mandatory text box contains no data.

Max Length

Specify the maximum number of characters that a user can enter in a text box.

  • By default, the maximum length of a text box is 0 (zero), which allows a user to enter any number of characters in the field.

  • If you set a maximum length, a user cannot enter more than the maximum number of characters into the text box. Only characters up to the maximum number set appear in the field.

The Max Length property is independent of Type and Format properties.

Multiline

Use the Multiline property to handle text that may go beyond one line, such as customer address. (Default: No. This means the height of the control defaults to 22.) If you click Yes for Multiline, you can specify the Height of the text box. (Default: 22)

Note When you choose to use multi-line property for a capture text field, you can preserve line breaks during OCR lassoing. See Properties of a Capture Text Field.
Field Type

Select a predefined field type for the text box. For example, if the text box will be used for entering dates, select Date as field type.

The predefined field types for a text box include the following:

Data Type

Description

String (default)

Accepts any characters as a string. Use the String field independently or with the Max Length property.

On selecting this data type, the Mask property becomes available that controls the format of the value entered by the user at runtime. This property is only for display purpose and does not affect the value entered.

At runtime, the mask format is displayed in the text box. As you type, your input follows the mask defined.

Numeric

Accepts any whole number. Use the Numeric field independently or with the Max Length property.

Decimal

Accepts any floating-point number' the decimal place is not fixed and must be entered if required. Use the Decimal field independently or with the Max Length property.

On selecting this data type, the following properties become available:

  • Allow Decimals: Displays a numeric fraction after the decimal point. (Default: Yes)

  • Decimal Precision: Specifies the number of digits allowed after the decimal point. For example, If you enter a decimal number as 0.234, and specify decimal precision to 2, the system displays ".23".

Currency

Accepts digits and a decimal place. The number of digits that can be allowed after the decimal place is based on the regional settings. For example, for the UK region, the currency value can be up to 2 decimal places; for Italy, it can be up to 6 decimal places; for Denmark, the currency may not allow any decimal values.

If you select this data type, the following properties become available:

  • Allow Decimals: Displays a numeric fraction after the decimal point. (Default: Yes)

  • Decimal Precision: Specifies the number of digits allowed after the decimal point. For example, If you enter a decimal number as 0.234, and specify decimal precision to 2, the system displays ".23".

  • Currency Code: This property allows to associate a currency which formats the value entered at runtime to match the user locale. By default, the Currency Code field is empty. Currency code can be defined in the Data Module. See Manage currency codes. When you create a currency field you can optionally consume a currency code. When you associate a currency code, anyone who inputs data in that field will see the value represented in the currency format that corresponds to their browser locale. The currency symbol is included.

Date

(Min Date and Max Date)

Accepts the maximum and minimum values for a date.

Accepts a short form date. The format depends on regional settings and cannot be altered.

Note Maximum date is mandatory for touch forms else it sets the current date as Maximum date. For example, if you set the minimum date as 2030 and leave the maximum date as blank, the form displays dates from 2030 to 2016. If you do not set the maximum date and release the form, a message appears reminding you to enter the maximum date.

Boolean

Accepts a true or false value.

Password

Accepts any characters as a string. However, the characters appears as * (asterisks) at runtime.

Note
  • You cannot use the Field Type property if you set the format for a text box.

  • On Windows, the Microsoft Virtual keyboard is disabled when using a text box in password mode.

Email

Accepts an email address.

URL

Accepts a URL web address.

Note If you view a form in a phone browser like Safari using a touchscreen, the device displays the touchscreen keypad to enter the data.

Mask

Controls the format of the value entered by the user at runtime. See Masked Text Box.

Format

Use this property to set up a field mask in the form of a regular expression that appears when a user enters data. Use a pre-defined regular expression or create custom expressions.

Regular Expression

A regular expression is a set of rules applied to a text box. The rules specify the type and range of data that a user can enter. The expression tests the accuracy of input data as the form is being completed and ensures that the data entered conforms to the specified pattern. If the pattern is not followed, a message can inform the user of the error. For example, specify a regular expression for a text box in which a user must enter a name in the following format: <First name starting with a capital letter> space <Last name starting with a capital letter>. If the user forgets to enter the space before the Last name, a message can be displayed.

Supported regular expressions include:

  • Internet Email Address: \w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*

  • Internet URL: http://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?

  • Percentage: ^(100(?:\.0{1,2})?|0*?\.\d{1,2}|\d{1,2}(?:\.\d{1,2})?)$

  • Time: ([0-1][0-9]|[2][0-3]):([0-5][0-9])

  • UK Date: (0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d

  • UK DateTime: 9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d\s(20|21|22|23|[01]\d|\d)(([:][0-5]\d){1,2})$

  • UK Postcode: (?:(?:A[BL]|B[ABDHLNRST]?|C[ABFHMORTVW]|D[ADEGHLNTY]|E[CHNX]?|F[KY]|G[LUY]?|H[ADGPRSUX]|I[GMPV]|JE|K[ATWY]|L[ADELNSU]?|M[EKL]?|N[EGNPRW]?|O[LX]|P[AEHLOR]|R[GHM]|S[AEGKLMNOPRSTWY]?|T[ADFNQRSW]|UB|W[ACDFNRSV]?|YO|ZE)\d(?:\d|[A-Z])? \d[A-Z]{2})')

  • US DateTime: [- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d\s(20|21|22|23|[01]\d|\d)(([:][0-5]\d){1,2})$

Value When Empty

Use this property to specify a default value to be used by an action (.NET, Web Service, or DB Query) at runtime if the text box remains empty. The value can be String or Null. If the text box value is empty at runtime, the system checks which property is selected at the design time. If Null is selected, the value of the text box when empty is null. If String is selected, the value of the text box fetches the string value given at the design time and displays it at runtime. By default, the text box is empty.

Hint Text

Use this property to hint the user to enter a value in the input field. The hint text appears before the user enters a value. When you click on the control, the hint text disappears.

Note
  • The hint text only appears if the control does not have a value, default value or focus.

  • If you import a form from a previous version of TotalAgility, the hint text appears empty.

Design

Configure the design properties. See Configure the design of a control.

Properties of a Capture Text field

The following properties are only available for a Capture Text field:

Preserve Line Breaks

Allow preserving line breaks for a multi-line field when lassoing, so that the line breaks are preserved when data is populated in the field.

Field Name

Displays the name of the field in read-only mode.

Auto Complete

Allow to enable Auto Complete. (Default: No)

Ignore Case

Allow the field to accept letters in uppercase and lowercase. By default, the text field is case-sensitive.

Read Only

Allow a user to edit the field at runtime. (Default: Yes)

Note This property is not displayed for a Verification form.