How to remove underline from jQuery input mask input plugin text fields

I want to remove underline from nested input implemented using jQuery inputmask plugin- http://github.com/RobinHerbots/jquery.inputmask enter image description here

+6
source share
5 answers

To remove a mask, use the placeholder parameter. Assigning an empty string to a placeholder, removing a mask. You can assign a placeholder when creating a mask:

 $('input').inputmask("mask name", {"placeholder": ""}); 

Or change it later:

 $('input').inputmask({"placeholder": ""}); 
+3
source

You can also use data-placeholder = "" and initialize that way. Relations

PD: I am using Jasny: http://www.jasny.net/bootstrap/javascript/#inputmask-examples

+2
source

You can specify a placeholder (default _) as follows:

 $(document).ready(function(){ $("#date").inputmask("d/m/y",{ "placeholder": "dd/mm/yyyy" }); }); 

A placeholder can also be a single character, in which case it repeats for the entire length of your input.

 $(document).ready(function(){ $("#code").inputmask("aaaa",{ "placeholder": "*" }); }); 

So, to remove it, you specify an empty placeholder, for example:

 $(document).ready(function(){ $("#noplaceholder").inputmask("aaaa",{ "placeholder": "" }); }); 
+1
source
 $(document).ready(function(){ $('#code').inputmask({ "placeholder": "" }); $( "#code" ).focus(function() { $('#code').inputmask({ "placeholder": "" }); }); }); 

If it also appears on a focus event, try this.

0
source

this is my html element

 <input dir="ltr" type="tel" name="SecretaryPhone"> 

and in my jquery

 $('input[type="tel"]').mask('(999) 999-9999', { placeholder: "X" }); 

and the result is what I wanted

enter image description here

but in some versions (I don't know) the rebuild method is a responder,

you have to put a placeholder like this

 { placeholder: "(XXX) XXX-XXXX" } 
0
source

All Articles