For instance, we reside in Nigeria and sell our services to consumers. So our phone number fields on our forms should naturally read +234, right? Strictly follow these steps in this post to set your country code as default in Caldera forms.

494345930

Please note it is not advisable to make edits to your theme files directly; always make edits to your child theme instead. You are adding to your functions.php file. To look up your country ISO Alpha 2 format country code, and to set your country code as default in Caldera forms, click here.

add_filter( ‘caldera_forms_phone_js_options’, function( $options){

//Use ISO_3166-1_alpha-2 formatted country code

$options[ ‘initialCountry’ ] = ‘NG’;

return $options;

});

THE ISO CODE FOR NIGERIA is ‘NG’

That’s it. Got questions? Comment below.

Read next : How do you set up a redirect page on your WordPress website?

Leave a Reply

Your email address will not be published. Required fields are marked *