KoolInputKoolInputFullVersion 1.7.0.0 released on 10/22/2012

TextBox - KoolMaskedTextBox

Enter following
Phone:
IP Address:
Visa Credit Card:
SSN:

Description & Sample code

With KoolMaskedTextBox, you can set the format that you need user to key in by using $Mask property.

In the $Mask, there are several parts:

  • 1. Number: denoted by '#' character.
  • 2. Lower-case char: denoted by 'a' character.
  • 3. Uppper-case char: denoted by 'A' character.
  • 4. Special char: denoted by '~' character.

There are two type of special mask inputs:

  • 1. Range input: User only can enter in a numner range only, for example <0..255>
  • 2. Option input: User can only enter some character that you set, for example <m|f|b>

You can set behavior of KoolMaskedTextBox with $SelectionOnFocus when it is focused:

  • 1. "None" : Do nothing.
  • 2. "CaretToBeginning" : Move the caret to beginning
  • 3. "CaretToEnd" : Move caret to the end
  • 4. "SelectAll" : Select all the text

After user submit the form, you can get the value from KoolMaskedTextBox through below properties:

  • 1. $Value: Exact what user input.
  • 2. $ValueWithPrompt: User input and empty space filled with prompt char.
  • 3. $ValueWithLiterals: User input and literals from the mask.
  • 4. $ValueWithPromptAndLiterals: User input, prompt char in empty space and literals from the mask.

At client-side, you can use:

  • 1. set_value(_value),get_value():To set or get the value
  • 2. get_value_with_prompt(): User input and empty space filled with prompt char.
  • 3. get_value_with_literals(): User input and literals from the mask.
  • 4. get_value_with_prompt_and_literals(): User input, prompt char in empty space and literals from the mask.