Using the Masked Textbox Component
  • 17 Nov 2020
  • 2 Minutes to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

Using the Masked Textbox Component

  • Dark
    Light

Article summary

Overview

The Masked Textbox Form control outputs data supplied, provided by users, according to the format defined by one of the following Value Types:

  • General
  • Email address
  • Number
  • Decimal
  • Currency
  • Social security number
  • Phone Number

Behavior

Value TypePurpose
GeneralAccepts any text formatting or characters
NumberEnforces the textbox to only accept numbers
DecimalConfigures the textbox to only accept numbers and decimal values
CurrencyConfigures the textbox to only accept number values, and only two decimal place values
EmailAddressSets the textbox to only accept string values that contain an @ sign
SSNConfigures the textbox to only accept a 9 digit SSN number format
PhoneNumberEnforce the textbox to only accept a 10 digit Phone number
CustomAllows users to define their own custom string formatting
The Masked Textbox form component constrains data entry to the specified format. This component also enforces the user selected text formatting when paired with Required Outcome Scenarios or Optional Outcome Scenarios. 
A setting was introduced in v6.12+ that, when enabled, outputs an empty value for incomplete input for Optional Outcome Scenarios.  This can be found under Behavior > Produce Empty Text For Invalid Value

The Masked Textbox component can be found in the Toolbox tab, under the Data category.

Example

The example form will require six pieces of applicant information, five of which must conform to specific formatting rules.

  • Name can contain any value.
  • Age must contain a number.
  • Email must contain a valid email address.
  • Cash Amount must contain a currency value.
  • Interest Decimal must contain a number and may contain a decimal point.
  • Social Security Number must contain number formatted as ###-##-####

The example assumes that there is already a designed most Applicant Details Form, placing the labels and masked textboxes in position.

2019-07-15_1340.png

Begin in the Designer Folder by selecting the Applicant Details Form and clicking the Edit link.
2019-07-15_1346.png

Of the six masked textboxes in the form, none have been configured.

2019-07-15_1347.png

Begin by selecting the Name field and giving it a Value Type of General. This will enforce no requirements on the input.

Next, select the Age field and give it a Value Type of Number.

Next, select the Email field and give it a Value Type of EmailAddress.

Then, select the Cash field and give it a Value Type of Currency.

After, select the Interest field and give it a Value Type of Decimal.

Finally, select the Social Security Number field and give it a Value Type of Social Security Number.

The form is complete. Save and close.

Back in the Designer folder, we click the Create Flow button.

Name the flow "Application Flow" and click Ok to open it in the Flow Designer.
2019-07-15_1355.png

Begin by placing "Applicant Details" form in our flow. Located Flows, Rules, Forms and Reports > Forms [Interaction] > [Current Folder].

Click Add to place this step in the flow.
2019-07-15_1356.png

In the Mapping Editor, give all inputs a Mapping Type of "Ignore" and click Ok.

Next, connect the form's Done outcome to the End Step. Save and close.
2019-07-15_1358.png

To test the form, click Debug on the Action Bar.

Validations
Not filling in the form fields will return an error message


2019-07-15_1359.png

Clicking the Done button after filling the form fields with invalid data results in error messages for those fields.

But when filling in the form fields with valid data, the field error messages disappear.

On submission, our flow will run to the end.



Was this article helpful?