• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Hour 15. User Input Elements > Restricting Text Input

Restricting Text Input

When a user is entering data into a field, it is often a good idea to only allow him to type characters that make sense. For instance, if the user is asked what year he was born, he should only need the number keys to answer. There is never a need to type letters or other characters.

You restrict which characters can be typed into an input field by using the restrict property of that field. If you don't set this property at all, any character would be allowed in the field. However, if you set it to a string, only characters in that string are allowed.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint