Richard
Richard

Reputation: 6116

Understanding iMask Settings and Notation

I'm planning on using this plugin in my form. But I just want an better explanation of the options than what they gave you.

type: What is this? What is the fixed or number option do?
mask: does anyone have any good resources where I can learn mask notation?
stripmask: what does this mean? If it means remove mask, then why not just remove class="iMask" from the tag?

Thanks

Upvotes: 2

Views: 1010

Answers (1)

Sara
Sara

Reputation: 8242

Gleaned from the iMask Documentation and some tinkering:

Type - Limits characters that can be entered into an input field

  • Number: Defaults to a decimal value (any length). Valid characters: 0123456789
  • Fixed: Limited to the characters specified in the mask option. No more, no less.

Mask - Dictates the format an input field value must follow

  • 9: Stands for any numerical symbol. Default valid characters: 0123456789
  • A: Stands for any alphabetical character. Default valid characters: abcdefghijklmnopqrstuvwxyz
  • X: Stands for any numerical OR alphabetical character

StripMask - Removes or preserves the mask syntax hint on an input field

  • True: Removes the mask from the input field when the user is done editing. Example: 09/24/12 would become 092412 when the input field loses focus.
  • False: Mask remains in input field.

Upvotes: 4

Related Questions