VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Development Projects, Modifications, Hacks & Tweaks. VM1.1 => Topic started by: Daniel Wagner on March 25, 2006, 22:18:25 pm

Title: Format US Phone Number: (aaa) ppp-nnnn
Post by: Daniel Wagner on March 25, 2006, 22:18:25 pm
Hacked htmlTools.class.php to automatically format a US phone number by adding parenthesis around zip code, a space, 3 digit prefix, a dash, and then the remaining 4 numbers: (aaa) ppp-nnnn. Returns error if final string is not complete (14 characters).

File attached with hacks commented in code.



[attachment cleanup by admin]