Re: input field masks

From: Date: Fri, 12 Sep 2003 12:35:01 +0000
Subject: Re: input field masks
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-162415@lists.php.net to get a copy of this message
PHP is server side, it has nothing to do with client side, aside from server up some information. You can, and should, validate the input using PHP after it is submitted. For client side validation you would need to use javascript. You can do what you are trying to do in javascript, but it will get very complicated since you need to use the onkeypress to capture and process each key stroke to make sure the / remain. I think using PHP to validate after submission would be a lot easier and much more flexible. If you do it right, the user could put in something like +3 to enter a date three days from todays date. On Friday, September 12, 2003, at 05:20 AM, Bobpilly wrote:
Hello all I am trying to enforce input masks for dates that are viewable in a single html text box. For example i would like a single tect box that the user will see ##/##/#### in and when they click on the field they will only be able to enter digits in the ## areas the / will remain. Is php cable of doing this? Thanks for any help in advance! Cheers Bob -- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577


« previous php.general (#162415) next »