I am trying to add a phone number field using the spry text field in a form. It does not create the format. Also how can I change the text from being bold in the form to normal.
Thanks!
Here's a little script I found that will format the phone number when they move to the next field in the form...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Phone Number</title>
<script language="javascript">
function addDashes(f)
{
f.value = f.value.slice(0,3)+"-"+f.value.slice(3,6)+"-"+f.value.slice(6,10);
}
</script>
</head>
<body>
<form>
Phone: <input type='text' name='phone' onblur='addDashes(this)'><br />
Cell: <input type='text' name='cell' onblur='addDashes(this)'><br />
Home: <input type='text' name='home' onblur='addDashes(this)'><br />
</form>
</body>
</html>
I tried this and it does not work (see below).
<th style="text-align: right" scope="col">Zip:</th>
<th scope="col"><input name="Zip" type="text" id="Zip" size="70" /></th>
</tr>
<tr>
<th style="text-align: right" scope="col">Phone:</th>
<th scope="col"><input type='text' name='phone' onblur='addDashes(this)'/></th>
</tr>
<tr>
<th style="text-align: right" scope="col">Fax:</th>
<th scope="col"><input name="Fax" type="text" id="Fax" size="70" /></th>
North America
Europe, Middle East and Africa
Asia Pacific