1<?php
2/**
3* Set intiial country for Caldera Forms phone fields
4*/
5add_filter( 'caldera_forms_phone_js_options', function( $options){
6 //Use ISO_3166-1_alpha-2 formatted country code
7 $options[ 'initialCountry' ] = 'CH';
8 return $options;
9});
1<?php
2/**
3 * Show only specific countries' flag in Caldera Forms phone fields
4 */
5add_filter( 'caldera_forms_phone_js_options', function($options ){
6 $options[ 'onlyCountries' ] = array( 'cn', 'tw' );
7 return $options;
8});