jsInputFormatter is a easy way to format HTML inputs with masks.

Syntax:

import the jsInputFormatter.js
set the function below on oninput event to input format.

inputFormatter(event,mask)
event: element input event
mask: String with mask
# - Any valid number
* - Anything
Others characters don't change

inputDecimalFormatter(event,decimal)
event: element input event
decimal: Integer number with decimal

Example 1 - Credit Card:

Credit Card #### #### #### ####
<input id="cartao" type="text" oninput="inputFormatter(event,'#### #### #### ####')"/>

Example 2 - Phone number:

Brazil Phone number (##)*####-####
<input id="phone" type="text" oninput="inputFormatter(event,'(##)*####-####')"/>

Example 3 - Decimal number :

Decimal 0.00
<input id="valor" type="number" oninput="inputDecimalFormatter(event,2)" value='0.00'/>

Features

  • input formatter
  • format mask
  • javascript formatter

Project Samples

Project Activity

See All Activity >

License

GNU General Public License version 3.0 (GPLv3)

Follow jsInputFormatter

jsInputFormatter Web Site

You Might Also Like
RMM Software | Remote Monitoring Platform and Tools Icon
RMM Software | Remote Monitoring Platform and Tools

Best-in-class automation, scalability, and single-pane IT management.

Don’t settle when it comes to managing your clients’ IT infrastructure. Exceed their expectations with ConnectWise RMM, our MSP RMM software that provides proactive tools and NOC services—regardless of device environment. With the number of new vulnerabilities rising each year, smart patching procedures have never been more important. We automatically test and deploy patches when they are viable and restrict patches that are harmful. Get better protection for clients while you spend less time managing endpoints and more time growing your business. It’s tough to locate, afford, and retain quality talent. In fact, 81% of IT leaders say it’s hard to find the recruits they need. Add ConnectWise RMM, NOC services and get the expertise and problem resolution you need to become the advisor your clients demand—without adding headcount.
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of jsInputFormatter!

Additional Project Details

Intended Audience

Developers, End Users/Desktop

Programming Language

JavaScript

Related Categories

JavaScript HTML XHTML, JavaScript User Interface (UI) Software

Registered

2019-06-17