Page History
...
ConfiForms Form Definition | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||
Field Definitions: This is the area where you define the fields ----------------------------------------------------------------------------------- Captcha Access Section ----------------------------------------------------------------------------------- Requestor Identify Section |
...
Hidden field and rule for normalizing the phone number ----------------------------------------------------------------------------------- DoD Organizational Affiliation Section Us DOD Activity Code DoD Contractor Additional Fields Rules to Hide and Show addition fields ---------------------------------------------------------------------------------- Sponsoring Activity Section ------------------------------------------------------------------------------------ Multi Factor Authentication type -------------------------------------------------------------------------------------- Cybersecurity Training Certificate Section ------------------------------------------------------------------------------------ IP Catcher -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Below is where the Fields are shown on the page. |
HTML |
---|
<script>
function formatPhoneNumber(phoneNumberString) {
var match = phoneNumberString.match(
/^\s*(?:\+?(\d{1,3}))?[-. (]*(\d{3})[-. )]*(\d{3})[-. ]*(\d{4})(?: *x(\d+))?\s*$/
);
if (match) {
return `${match[1] ? "+"+match[1]+" " : ""}(${match[2]}) ${match[3]}-${match[4]}`;
}
return "";
}
function setPhoneNumberValue(formName, formId) {
AJS.$(formName)
.find("#i_PhoneNumberFormatted")
.val(formatPhoneNumber(AJS.$(formName).find("#i_PhoneNumber").val()));
}
</script> |