The CreatorCon Call for Content is officially open! Get started here.

phone number field

soukayna
Tera Contributor

hi ,

i want to insert a phone number field using script any idea how to do it ?

thanks,

1 ACCEPTED SOLUTION

The phone territory (box above the phone number field) will automatically reflect the proper phone territory.   You will need to set the phone number via script with a valid E.164 format so for example in the US it would be +18005551212 and the phone territory will automatically reflect "North America" since the phone number starts with +1.


View solution in original post

4 REPLIES 4

Harsh Vardhan
Giga Patron

Hi ,



you want to make a field on form to enter only 10 digit phone number?



Thanks,


Harshvardhan


hi harsh ,


no i want to insert values from Business Rules in a Phone Number (E164) field


find_real_file.png


the field is shown like this :


find_real_file.png


any ideas ??


thanks,


The phone territory (box above the phone number field) will automatically reflect the proper phone territory.   You will need to set the phone number via script with a valid E.164 format so for example in the US it would be +18005551212 and the phone territory will automatically reflect "North America" since the phone number starts with +1.


Hi



Please check the script below .



function onChange(control, oldValue, newValue, isLoading, isTemplate) {


if (isLoading || newValue === '') {


g_form.clearValue('u_test');



return;


}



//Type appropriate comment here, and begin script below


var caller = g_form.getReference('caller_id', setMobile);



function setMobile(caller) {


if (caller)


g_form.setValue('u_test', caller.mobile_phone);


}



}



if you don't want to use call back function then create a script include and call it through glide ajax.



form inc.png



Hope it will help you



Thanks,


Harshvardhan