I have phone field in the data mapper format as 555555555 as will as on template created. How do I add hyphen in to make display like this 555-555-5555
Thanks. Katie
I have phone field in the data mapper format as 555555555 as will as on template created. How do I add hyphen in to make display like this 555-555-5555
Thanks. Katie
Double click on your script that generates the phone number, on the left in the Scripts pane, and click on “Expand”.
Then directly above “results.html(result)” paste the following:
result = result.slice(0,3) + “-” + result.slice(3,6) + “-” + result.slice(6,10);
This is what I alter to add a hyphen after the 5th digit if the property zipcode come over in the data file with more than 5 digits. How can I get it to not show if the zipcode come over with just 5 digits?
18960-
{
function add(value, operation) {
if (value === undefined || value === “”)
return;
operation(value);
}
var result = “”;
add(record.fields[“U_MAILING_ZIP”], function (value) { result += value; });
result=result.slice(0,5)+ “-” +result.slice(5,9);
results.html(result);
}