I want to remove underline from masked input implemented using jQuery inputmask plugin- http://github.com/RobinHerbots/jquery.inputmask

8 Answers
You can specify the placeholder (by default _) like this:
$(document).ready(function(){
$("#date").inputmask("d/m/y",{ "placeholder": "dd/mm/yyyy" });
});
The placeholder can also be a single character, in that case it is repeated for the whole length of your input.
$(document).ready(function(){
$("#code").inputmask("aaaa",{ "placeholder": "*" });
});
So to remove it you specify an empty placeholder like:
$(document).ready(function(){
$("#noplaceholder").inputmask("aaaa",{ "placeholder": "" });
});
You can also use data-placeholder="" and initialize just like that. Regards
P.D: I'm using Jasny : http://www.jasny.net/bootstrap/javascript/#inputmask-examples
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
but on some versions (I don't know it) the replacment technique is defendant,
you have to put placeholder like this
{ placeholder: "(XXX) XXX-XXXX" }
Maybe this will help.
When clearMaskOnLostFocus: true is set in the options (default), the mask will clear out the optional part when it is not filled in and this only in case the optional part is at the end of the mask.
For example, given:
$('#test').inputmask('999[-AAA]');
While the field has focus and is blank, users will see the full mask -. When the required part of the mask is filled and the field loses focus, the user will see 123. When both the required and optional parts of the mask are filled out and the field loses focus, the user will see 123-ABC.
This is in the documentation here.
Here's an example:
$("#whatever").inputmask("a{0,4}", {
clearMaskOnLostFocus: true
});
add those 3 options
placeholder: ' ',
showMaskOnHover: false,
showMaskOnFocus: false
like here:
var inputmask = new Inputmask({
mask: ["9{1,3}-A{1,2}-9{1,2}", "A{1,2}-9{1,3}-A{1,2}"],
keepStatic: true,
placeholder: ' ',
showMaskOnHover: false,
showMaskOnFocus: false
});
inputmask.mask($('#carteGriseImmatriculation'));
