How to set a default value as +31

Nigonda
Tera Contributor

How to set an default value as +31 for the Phone_Number field(Type-Phone Number (E164)) using the Dictionary attribute.

1 REPLY 1

yashkamde
Tera Guru

Hello @Nigonda ,

I was able to make it work using a Client Script (onLoad).

function onLoad() {
    if (g_form.isNewRecord()) {
        var currentValue = g_form.getValue('caller_phone_number');
        if (!currentValue) {
            // Set default country code to +1 for North America (US).
            // Replace "+31" with your region's country code if different.
            g_form.setValue('caller_phone_number', '+31');
        }
    }
}

  

 

If my response helped mark as helpful and accept the solution.