Masked input
Masked input allows to enter the data in certain format (dates,phone numbers, etc).
Example (123)123-123-1
Masked input allows to enter the data in certain format (dates,phone numbers, etc).
Example (123)123-123-1
Here's a good solution digitalbush.com/projects/masked-input-plugin/
If the developers have integrated into PHPmaker it would be very good.
Since it is JavaScript, you can do that yourself easily:
ew_AddClientScript("phpjs/jquery.maskedinput.js");
$("#x_YourField1").mask("99/99/9999");
$("#x_YourField2").mask("(999) 999-9999");
(Also read Server Events and Client Scripts in the help file for more info about the events.)
i have field "NUMBER"
i follow all the steps..
but on add page or edit page nothing happens. am i missing something?
jQuery requires a selector, use $("#x_YourField1").
I did it!
Was putting on the event [Client scripts - Table specific - Client script],
when the correct thing in [Client scripts - Table specific - Startup Script].
Question for you guys on this one. I followed your steps, and as far as the add/edit pages goes the mask (phone number in (999)999-999) is working fine. however, for some reason on the "view" and "list" pages, it is just showing "0" in the field. Any idea what could be causing that?
I have followed all steps as explain above, but nothing happend on add or edit page. My field is time type, field name : "TimeIn" and setup mask like this : $("#x_TimeIn").mask("99:99");
Is that wrong?
Hello, anyone knows how to do? I want it to mask phone number fields like "(xx)xxxx-yyyy". Thank you.
Why does not grid work with multiple lines?
nothing has changed it still works as expected, the point is to include the js file in page_head so its available for use, then call your jquery to set mask on specific field.
nway
-1. copy the jquery.maskedinput.min.js into some where i your project, eg i create a folder called "custom_plugin" and paste the file in there
-2. go to page_head event and paste the code below to include this file into all your files.
<script src="custom_plugin/jquery.maskedinput.min.js" type="text/javascript"></script>
-3. Now all you have to do is paste jquery in startup script of any page to initialise the input fields (refer to examples in the demo index file for how to use also refer to thier docs), for example go to your table->client scripts->add page->startup script and paste something like this.
// initialise the model field as a phone number
$("#x_Model").mask("(999) 999-9999");
-3. regenerate all files and its done, if its not working check the console log for errors
HINT:All web application libraries follow the same approach just find out what files it needs to work and include them into your project, then find out how you use the library's implementation
I tried this and works well until you use an Android device.
Any options?
Thanks!
Hello!
I'm new to PHP Maker and i just want to be clarified regarding the use of jquery.maskedinput.js.
what does this file contain?
thanks