twf-nikhila / smart-formatter

Open Source jQuery Library for smart formatting of HTML form fields.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Smart Formatter

Open Source jQuery Library for Smart Formatting of HTML input fields.

Features!

  • Easily convert input fields values into Uppercase, First letter only uppercase, Sentence case, Lowercase
  • Accept only numbers in input fields
  • Convert input fields values into Money Format
  • Select all the values typed when clicked on a input field.

Do all of these by simply adding a simple attribute to input field and provising suitable option values to it.

Documentation

  • Simply add sf="" to input tag
  • Multiple options can be added by space seperated
  • Activate Smart-Formatter for a form by calling Smart_format() function.

Options:

  • uc (Upper Case): Format Inputted values into all Uppercase
  • ucfirst (Upper Case First): Format first character into Uppercase
  • sc (Sentence Case): Format inputted values into Sentence case, that is capitalize first character after Period/Full-Stop (.), Exclamation mark (!), Question mark (?)
  • lc (Lower Case): Format inputted values into all lowercase
  • number: Accept only number for a input field
  • money: Format inputted values into money format
  • select-all : Select all the values when the field in selected.

License

Apache License

A small jQuery library by The Web Fosters (thewebfosters.com) team.

About

Open Source jQuery Library for smart formatting of HTML form fields.

License:Apache License 2.0


Languages

Language:JavaScript 100.0%