macromedia.coldfusion.cfml_general_discussion
[Top] [All Lists]

validating & masking using cfinput

Subject: validating & masking using cfinput
From: "DaSpaz"
Date: Thu, 21 Feb 2008 12:02:07 +0000 UTC
Newsgroups: macromedia.coldfusion.cfml_general_discussion

I have a form for users that asks for three phone numbers; office, cell and 
fax.  While everyone has an office number, not everyone has a cell and fax 
number.  I want the numbers to be in the format (###) ###-####.  I am using 
cfinput and setting up masking, which works well when there is a phone number.  
But, when there isn't a number, say a user doesn't have a cell number, that 
field is filled with zeros (like (000) 000-0000).   How do I get masking to 
work, but not fill in a field with zeros?  I tried validating, but it won't 
force using the parenthesis.

 My cfinput looks like:  <cfinput name="cellnumber" type="text" 
value="#query.cell# mask="(999) 999-9999" required="no" />


<Prev in Thread] Current Thread [Next in Thread>