Remove literals from input mask after form submit?
I think you want to use unmask
$("#myForm").submit(function() {
$("#txtPhone").unmask();
});
Based on Plugin Site:
$("#txtPhone").val($("#txtPhone").mask());
unmask is not a function. This is my way of use. autoUnmask: true
$('#amount').inputmask('999.999.999.999', {
numericInput: true,
autoUnmask: true,
});
Set removeMaskOnSubmit as true when you initialize the inputmask
$("#txtPhone").inputmask({removeMaskOnSubmit: true});