10-21-2018, 08:22 PM
One funcionality missed in coreBOS is a capable shows data with mask
Example:
User input a telephone number 551120201999
and system exhibit as :
Telephone +55 (11) 2020-1999
I know architecture of system turn this compliated
But I suggest, create a funcition in Workflow for put a mask in fields, this way, the problem is minimized.
Example of code, for ilustrate my suggestion
<?
function mask($val, $mask) {
$maskared = '';
$k = 0;
for ($i = 0; $i <= strlen($mask) - 1; $i++) {
if ($mask[$i] == '#') {
if (isset ($val[$k]))
$maskared .= $val[$k++];
} else {
if (isset ($mask[$i]))
$maskared .= $mask[$i];
}
}
return $maskared;
}
?>
Example:
User input a telephone number 551120201999
and system exhibit as :
Telephone +55 (11) 2020-1999
I know architecture of system turn this compliated
But I suggest, create a funcition in Workflow for put a mask in fields, this way, the problem is minimized.
Example of code, for ilustrate my suggestion
<?
function mask($val, $mask) {
$maskared = '';
$k = 0;
for ($i = 0; $i <= strlen($mask) - 1; $i++) {
if ($mask[$i] == '#') {
if (isset ($val[$k]))
$maskared .= $val[$k++];
} else {
if (isset ($mask[$i]))
$maskared .= $mask[$i];
}
}
return $maskared;
}
?>
Ranieri
eCRM Web
eCRM Web