Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Suggestion - function for put a Mask in filed
#1
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;
}
?>
Ranieri
eCRM Web
Reply


Forum Jump:


Users browsing this thread: