This is the script I currently have in the form but it does not work. Any ideas?
$(document).ready(function () {
$.getScript('http://formsservername/Forms/js/jquery.mask.min.js', function () {
$(".ssn input").mask("999-99-9999");
});
});
This is the script I currently have in the form but it does not work. Any ideas?
$(document).ready(function () {
$.getScript('http://formsservername/Forms/js/jquery.mask.min.js', function () {
$(".ssn input").mask("999-99-9999");
});
});
If you set the input type attribute to password, you will get circles to mask the input entry in the field
Example 1, directly targeting the field
$(document).ready(function () {
$("#q7 input").attr("type","password");
});
Example 2 with ssn Class assigned to field
$(document).ready(function () {
$('.ssn input').attr("type","password");
});
Hi Armando,
The code you have here is trying to load a file from your Forms server. Your server's URL should replace the "formsservername" in the second line, so if your URL is "https://armandolaserfiche.com/Forms" it should be:
$.getScript('https://armandolaserfiche.com/Forms/js/jquery.mask.min.js', function () {
You could also use a public URL in case your server doesn't have the file / you can't get it to work:
$(document).ready(function () { $.getScript('https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.16/jquery.mask.min.js', function () { $(".ssn input").mask("999-99-9999"); }); });
Additionally, as Steve mentioned, you need to apply the "ssn" class to the field in the Advanced tab (or use the direct reference like "#q7").