change initial country for caldera forms phone fields

Solutions on MaxInterview for change initial country for caldera forms phone fields by the best coders in the world

showing results for - "change initial country for caldera forms phone fields"
Tiphaine
22 Jun 2016
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});
Michela
12 Oct 2016
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});