Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Change initial country + add top countiries on Caldera forms

/**
 * Change default country on Caldera forms
 */
add_filter( 'caldera_forms_phone_js_options', function( $options){
	//Use ISO_3166-1_alpha-2 formatted country code
	$options[ 'initialCountry' ] = 'ZA';
	$options[ 'preferredCountries' ] = array( 'ZA', 'SWZ', 'LSO' );
	return $options;
});
Source by calderaforms.com #
 
PREVIOUS NEXT
Tagged: #Change #initial #country #add #top #countiries #Caldera #forms
ADD COMMENT
Topic
Name
4+7 =