Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

DaShaun dashaun

🎯
Focusing
  • KC
View GitHub Profile
View SugarFieldPhone.php
<?php
// custom/include/SugarFields/Fields/Phone/SugarFieldPhone.php
require_once('include/SugarFields/Fields/Phone/SugarFieldPhone.php');
class CustomSugarFieldPhone extends SugarFieldPhone{
private $replacement_chars = array(' ','-','(',')','x','X','.','+','#','!');
/**
* Remove any special characters to sanitize input, storing only ints
* @see parent::save