Hi, I could use some help. How do I remove the hyphens or other special characters in the phone field for my database? THANKS so much! Jenn
this can't be done as simple SQL query, but can be done in php: PHP: <?include "/full/path/to/amember/config.inc.php";foreach($db->users_find_by_string('%', 'login') as $u){ $u['phone'] = preg_replace('/\D/', '',$u['phone']); $db->update_user($u['member_id'], $u);} ?> Please backup database before doing this.
great but another q ... great thanks alex. it worked. is there a way to add this code as a part of the template or before the form is submitted (instead of running script separately every day)?
Sure, in signup template you can use jQuery validator plugin to validate that field. Add this class for phone field: Code: class="required number"