Masked input

Masked input

Postby alexandr » Tue Sep 11, 2012 10:09 pm

Masked input allows to enter the data in certain format (dates,phone numbers, etc).
Example (123)123-123-1
alexandr
 

Re: Masked input

Postby zmakcw » Tue Sep 11, 2012 11:18 pm

Here's a good solution digitalbush.com/projects/masked-input-plugin/
If the developers have integrated into PHPmaker it would be very good.
zmakcw
 

Re: Masked input

Postby Webmaster » Wed Sep 12, 2012 10:00 am

Since it is JavaScript, you can do that yourself easily:

1. Enable "Use jQuery" in Advanced Settings,
2. Put your jquery.maskedinput.js in the "phpjs" folder of your site,
3. Include the script by Page_Head server event,

ew_AddClientScript("phpjs/jquery.maskedinput.js");

4. Setup your masks in Startup Script, e.g. in Add page,

$("#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.)
Webmaster
 
Posts: 10731
Joined: Fri Aug 06, 2004 5:59 pm

Re: Masked input

Postby made » Sat Nov 10, 2012 9:20 pm

i have field "NUMBER"
i follow all the steps..
1. Enable "Use jQuery" in Advanced Settings, (not necessary since v9, jQuery is always included)
2. Put jquery.maskedinput.js in the "phpjs" folder of my site,
3. Include the script:
ew_AddClientScript("phpjs/jquery.maskedinput.js");
on Page_Head server event
4. Setup masks in client scripts-table specific-Startup Script on add page and edit page
$("x_NUMBER").mask("99-99-9999");

but on add page or edit page nothing happens. am i missing something?
made
 

Re: Masked input

Postby Webmaster » Mon Nov 12, 2012 9:43 am

jQuery requires a selector, use $("#x_YourField1").
Webmaster
 
Posts: 10731
Joined: Fri Aug 06, 2004 5:59 pm

Re: Masked input

Postby SouzaRM » Sat Aug 24, 2013 10:11 pm

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].
SouzaRM
 
Posts: 7
Joined: Fri Aug 09, 2013 10:08 am

Re: Masked input

Postby noimad1 » Tue Dec 03, 2013 7:31 am

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?
noimad1
 
Posts: 13
Joined: Tue Jul 16, 2013 5:23 am

Re: Masked input

Postby noorshiam » Mon Jan 13, 2014 1:36 pm

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?
noorshiam
 
Posts: 46
Joined: Tue Nov 19, 2013 2:33 pm

Re: Masked input

Postby ronaldoo » Wed Jun 04, 2014 4:26 am

Hello, anyone knows how to do? I want it to mask phone number fields like "(xx)xxxx-yyyy". Thank you.
ronaldoo
 
Posts: 3
Joined: Tue May 13, 2014 4:27 am

Re: Masked input

Postby rodrigofaustino2 » Tue Oct 10, 2017 9:58 pm

Why does not grid work with multiple lines?
rodrigofaustino2
 
Posts: 33
Joined: Thu Jul 23, 2015 7:01 pm


Return to Feature Requests (PHPMaker)