It would be nice to have support for masked input.
For example:
http://digitalbush.com/projects/masked-input-plugin
Masked input
-
- AppGini Super Hero
- Posts: 336
- Joined: 2015-12-23 16:52
Re: Masked input
I have masked input working. And it's pretty simple.
Copy the js script from http://digitalbush.com/projects/masked-input-plugin/
Put the js file in your hooks folder.
Insert this code at the bottom of hooks/footer-extras:
In your hooks/tablename-dv.js, do this:
Of course, there are different masks and you'll use your own field names.
The maskedinput plugin is not perfect (it doesn't validate date or time entries, etc), but for phone numbers, government ID numbers, credit card numbers, etc, it does pretty good.
Copy the js script from http://digitalbush.com/projects/masked-input-plugin/
Put the js file in your hooks folder.
Insert this code at the bottom of hooks/footer-extras:
Code: Select all
<script src="hooks/jquery.maskedinput.js" type="text/javascript"></script>
Code: Select all
$j(function(){
$j('#phone').mask('(999) 999-9999');
$j('#cell').mask('(999) 999-9999');
$j('#fax').mask('(999) 999-9999');
});
The maskedinput plugin is not perfect (it doesn't validate date or time entries, etc), but for phone numbers, government ID numbers, credit card numbers, etc, it does pretty good.
Re: Masked input
Cool, it allows the calendar too?grimblefritz wrote:I have masked input working. And it's pretty simple.
Copy the js script from http://digitalbush.com/projects/masked-input-plugin/
Put the js file in your hooks folder.
Insert this code at the bottom of hooks/footer-extras:
In your hooks/tablename-dv.js, do this:Code: Select all
<script src="hooks/jquery.maskedinput.js" type="text/javascript"></script>
Of course, there are different masks and you'll use your own field names.Code: Select all
$j(function(){ $j('#phone').mask('(999) 999-9999'); $j('#cell').mask('(999) 999-9999'); $j('#fax').mask('(999) 999-9999'); });
The maskedinput plugin is not perfect (it doesn't validate date or time entries, etc), but for phone numbers, government ID numbers, credit card numbers, etc, it does pretty good.
/Giuseppe
Professional Outsourcing Services
Professional Outsourcing Services
-
- AppGini Super Hero
- Posts: 336
- Joined: 2015-12-23 16:52
Re: Masked input
It only does input masking. No data validations. So it doesn't directly solve your calendar problem, but it would be a starting point.
-
- AppGini Super Hero
- Posts: 336
- Joined: 2015-12-23 16:52
Re: Masked input
Next free bit of time I have, I might experiment with this one:
https://github.com/RobinHerbots/jquery.inputmask
It's more complicated, but it allows data validation. Not only can specify a mask that looks like 99/99/9999 for a date, but you can include validation code to ensure the date is legit and in range.
And other goodies.
https://github.com/RobinHerbots/jquery.inputmask
It's more complicated, but it allows data validation. Not only can specify a mask that looks like 99/99/9999 for a date, but you can include validation code to ensure the date is legit and in range.
And other goodies.
Re: Masked input
Pretty sweet. I'm going to have a bit of a play around. Thanks.
Re: Masked input
Link appears to be dead???grimblefritz wrote: ↑2016-05-20 23:29It would be nice to have support for masked input.
For example:
http://digitalbush.com/projects/masked-input-plugin
Re: Masked input
Has anyone been able to get this to work?? and if so, is there possibly an example project?grimblefritz wrote: ↑2016-08-30 23:11Next free bit of time I have, I might experiment with this one:
https://github.com/RobinHerbots/jquery.inputmask
It's more complicated, but it allows data validation. Not only can specify a mask that looks like 99/99/9999 for a date, but you can include validation code to ensure the date is legit and in range.
And other goodies.
Alan
Re: Masked input
Hi Alan,
I have added this in header-extras.php
and invoked using this in tablename-dv.js
Works fine for phone numbers, that's all I've needed.
Sorry I don't recall from where I downloaded but it doesn't appear to be hard to find.
~Paul
I have added this in header-extras.php
Code: Select all
<script src="hooks/jquery.inputmask.js"></script>
Code: Select all
$j('#Phone').inputmask({"mask": "(999) 999-9999"});
Sorry I don't recall from where I downloaded but it doesn't appear to be hard to find.
~Paul
Re: Masked input
Paul,
Thanks
I will give that a try.
For me this will help a lot.
Alan
Thanks
I will give that a try.
For me this will help a lot.
Alan
Re: Masked input
I got this to work..
Slick
I will work on other options besides Phone, but that's all I needed at this point.
Alan
Slick
I will work on other options besides Phone, but that's all I needed at this point.
Alan