Using a Custom Masked Textbox
  • 12 Mar 2021
  • 1 Minute to read
  • Dark
    Light

Using a Custom Masked Textbox

  • Dark
    Light

Article summary

Example Lab Article
While Example Lab projects are resources for public use, articles and assets are not actively maintained. Screenshots and features are from the specified version below. These references may become dated as new versions are released.


Overview

Example Lab Details

Version6.4.0
Root FolderExample Lab - Custom Mask Textbox
Modules None
DependenciesNone

This Example Lab Project demonstrates how to use a custom masked textbox to restrict a user entry to a 10 digit phone number.


Explanation

This project displays a Form with a textbox that will only accept a 10 digit number as an input from the user. This is accomplished by selecting "custom" when adding the textbox Form component to the Form grid in the properties panel. Selecting the "Custom" option allows the user to apply a custom mask to the textbox, restricting entry type and length. In this example the input will be restricted to a number, 10 digits long by using the following mask "^\d{3}\-?\d{7}$". Furthermore by filling in the "Custom Display Mask" textbox option with "999-9999999" the user will also be shown "___-_______" when filling in the textbox to conform to the typical formatting of a 10 digit phone number.

Reference Articles



Project Download

The examples attached were developed to be instructional and were not developed as officially supported components. For more information or to engage our service team to develop fully supported, production quality solutions, please contact services@decisions.com. Import the project below to a Decisions environment on version 6.4.0 or later using our Importing/Exporting article.





Was this article helpful?